Developers · Assets
Using Static Assets on Pages
Last updated 2 November 2026
This guide walks through the practical steps of including static assets (CSS, JavaScript, images, and fonts) in your Insites pages. For an overview of the asset system and directory structure, see Assets Introduction.
Including a CSS File
To add a CSS file to your pages:
- Create your CSS file in
(e.g., ). - Reference it in your layout or page using the
filter. - Sync or deploy to apply the changes.
<link rel='stylesheet' href='{{ 'styles/app.css' | asset_url }}'>Including a JavaScript File
To add a JavaScript file:
- Create your JS file in
(e.g., ). - Reference it in your layout or page, ideally before the closing
tag for performance. - Sync or deploy to apply the changes.
<script src='{{ 'scripts/app.js' | asset_url }}'></script>Including Images via CSS
To reference images from CSS files, use the
Verifying Changes
After syncing or deploying, check your instance to confirm the assets loaded correctly. If changes do not appear, try a hard refresh in your browser (Ctrl+Shift+R or Cmd+Shift+R) to bypass the browser cache.