Configure Your Site
CSS and JavaScript
Adding CSS and JavaScript to a single page?
The settings described on this page are for adding CSS and JavaScript to every page on your site. To add CSS and JavaScript to a single page, use Page Settings instead.
Overview
This page describes how to configure your site to include additional CSS or JavaScript files that load on every page of your site.
This is typically used for approved custom functionality or integrations that apply sitewide.
- CSS is managed in
_includes/css JavaScript is managed in_includes/javascript
Republish required
If you change the value of any of the fields listed below, be sure to republish
_includes/css and/or _includes/javascript.
CSS fields
| Element name | Required | Multiple |
|---|---|---|
|
CSS file
CSS file to attach to every page on your site. File in
_code or External Link only.
|
No
|
Yes
|
JavaScript fields
| Element name | Required | Multiple |
|---|---|---|
|
JavaScript file
JavaScript file to attach to every page on your site. File in
_code or External Link only.
|
No
|
Yes
|
|
Use as module?
If checked, this JavaScript file will be loaded using the
type="module" attribute. Useful if you need to load modern JavaScript that uses import and export.
|
No
|
No
|
Do
- Get approval before adding custom CSS or JavaScript files to your site
- Use global CSS and JavaScript only for sitewide functionality
- Store global CSS and JavaScript files in your site's
_codefolder
Don't
- Don't use global files for page-specific styling or behavior—use Page Settings instead
- Don't make purely aesthetic changes that conflict with the IU brand or Rivet
- Don't add unapproved, unnecessary, or overly complex code