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.
  • config/settings_schema.json declares the theme-wide settings and config/settings_data.json stores their values. See Root theme configuration.
  • All CSS lives in assets/. Reference it from layouts/theme.liquid or a template with {{ 'theme.css' | asset_url | stylesheet_tag }}, or inline a small file with {{ 'theme.css' | inline_asset_content }}. A per-template styles.css and a theme-root styles.css or global_styles.css are deprecated, and companies on the asset model reject them on push. The template-stylesheet-to-asset-migration skill from fluid theme skills install moves them for you.
  • cover.png is the theme’s preview image.
  • .fluid-theme.json is written by the CLI to record which theme and version you last pulled. Don’t edit it by hand.
  • A storefront Page’s template lives at page/<template-name>/index.liquid.

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>, including the page’s <title> and Open Graph tags. Always include this tag, and don’t add your own <title>.
  • {{ 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: Member storefront themes add members_dashboard, members_page, and members_login. See Member page templates. sections/, blocks/, and components/ hold reusable pieces that templates render; they aren’t page types. 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.

Add a template for every page type your store uses

Fluid routes each storefront URL to a template type, such as /home/posts/<slug> to post. If your theme has no template of that type, Fluid can’t render the page and shows your home page at that URL instead. It doesn’t return an error, so the page looks like it loaded. Run fluid theme lint to list the page types your theme has no template for. To fix it, add the missing template. Don’t work around it in layouts/theme.liquid with a redirect, a <meta http-equiv="refresh">, or JavaScript. For blog posts, that means two templates:
A post template reads the current post from post. See Post template. Open a post in fluid theme dev to check it renders the post rather than your home page, then push the new files with fluid theme push. If the theme already has an active template of that type, pushing another one doesn’t replace it. Edit the existing template instead.

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:
Output {{ block.fluid_attributes }} on each block’s outer element so the Page Editor can select it. Fluid adds the equivalent attributes to each section’s wrapper for you. For standalone blocks with their own files, see Blocks and components.

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. When no locale file defines a key, t prints “Translation missing” text. Add default: straight after t to show your own text instead, such as {{ 'products.sold_out' | t | default: 'Sold out' }}. Pass values to fill placeholders, such as {{ 'products.from_price' | t: price: product.price }}. A key whose value is an object with one and other entries is pluralized by the count you pass.

Available Liquid Filters

Fluid supports the standard Liquid filters, such as date, truncate, and join, and adds these: Prices such as product.price are already formatted for the visitor’s currency, so output them directly. Fluid has no money filter. 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.