Developers · Assets
Assets Introduction
Last updated 7 November 2026
Assets are static files that the web server delivers directly to the browser without any server-side processing. This includes CSS stylesheets, JavaScript files, images, fonts, documents, and media files. Assets live in the
Directory Structure
Organize your assets into subdirectories by type:
app/assets/
images/
logo.png
favicon.ico
scripts/
app.js
vendor.js
styles/
app.css
vendor.css
fonts/
custom-font.woff2Referencing Assets in Templates
Use the
<link rel='stylesheet' href='{{ 'styles/app.css' | asset_url }}'>
<script src='{{ 'scripts/app.js' | asset_url }}'></script>
<img src='{{ 'images/logo.png' | asset_url }}' alt='Logo'>Note
Always use the
Adding CSS
Place your CSS files in
If you need page-specific CSS, use the
Adding JavaScript
Place JavaScript files in
Like CSS, you can use the
Images and Media
Static images in the
Deployment
Assets are deployed with the rest of your codebase using
After deployment, assets are served from the CDN with cache-busting URLs that change automatically when the file content changes. This means browsers always load the latest version without manual cache clearing.