Skip to main content
Fluid themes are built on the Liquid templating language — a proven, widely adopted templating engine — combined with a JSON schema system that powers the visual Page Editor. As a developer, you have full control over markup, styles, logic, and content structure. This guide walks you through the key building blocks of a Fluid theme.

Theme File Structure

A Fluid theme is organized into directories by function. Each directory holds a specific type of file, and Fluid’s template resolver knows where to look for each one.

Layout File

The layouts/theme.liquid file is the outermost shell rendered for every page on your storefront. It contains the <html>, <head>, and <body> tags that wrap all page-specific content. Two special Liquid tags connect the layout to the rest of the theme:
  • {{ content_for_header }} — Outputs platform-injected metadata, scripts, and stylesheets into the <head>. Always include this tag.
  • {{ content_for_layout }} — Outputs the rendered content of the current page template between the <body> tags.
Here is a minimal layout example:

Choose a layout for a template

Templates use layouts/theme.liquid by default. To use another layout, add the layout tag to the template and pass the layout name without the .liquid extension:
Fluid renders this template inside layouts/custom.liquid. To render the template without a layout, use none:
When you disable the layout, the template must provide any document structure and global markup it needs.

Template Files

Template files contain the page-specific Liquid markup rendered inside {{ content_for_layout }}. Each template type maps to a page category in Fluid: Each template type can have multiple named templates stored as subdirectories — for example, product/default/ and product/featured/. Only one template per type is published and active at a time, but you can create and preview others before switching.

Sections

Sections are the primary building blocks of Fluid pages. Each section is a self-contained Liquid file that pairs markup with a {% schema %} block defining its configurable settings. The schema powers the right panel of the visual Page Editor. Here is an example product header section:

Blocks

Blocks are repeatable content items defined within a section’s schema. They allow editors to add, remove, and reorder dynamic items — like testimonial cards, feature bullets, or image slides — without touching code. Define blocks in the schema and render them in Liquid using section.blocks:

Assets

Store images, fonts, stylesheets, and scripts in the assets/ directory. Reference any asset in Liquid using the asset_url filter:
Fluid distinguishes between two types of assets:
  • Binary assets — Images, fonts, and other files served as-is (e.g. .png, .jpg, .woff2)
  • Non-binary assets — CSS and JavaScript files that can be edited directly in the CLI or Code Mode
All assets are served via Fluid’s CDN, so the asset_url filter always resolves to the correct CDN URL regardless of environment.

Localization

Fluid’s translation system uses JSON locale files stored in locales/. Each file corresponds to a language (e.g. locales/en.json, locales/es.json) and contains a nested key-value structure.
Reference any locale key in Liquid using the | t filter:
When a visitor’s language is set, Fluid automatically resolves | t to the correct locale file. If a key is missing in a non-English locale, Fluid falls back to the English value.

Available Liquid Filters

Fluid extends Liquid with a set of commerce-focused filters for formatting and transforming data: For pushing your finished theme to Fluid or setting up a local development workflow, see the Fluid CLI guide. For theme-wide settings, see root theme configuration. When you add navigation, use the canonical patterns in supported storefront paths.