Auto-generated documentation for Liquid schemas, drops, tags, and filters. Documentation stays fresh—whenever you update the schema, docs regenerate automatically.
git clone https://github.com/Shopify/theme-liquid-docs
cd theme-liquid-docs
yarn install
data/
— JSON files with Liquid drops, tags, and filters for themesschemas/
— JSON Schema definitions for Liquid theme artifactsai/
— Context files that power AI-generated Liquid rulestests/
— Test suite ensuring documentation accuracyscripts/
— Automation scripts for docs generation
The AI sources generates comprehensive Liquid guidelines from modular rules files.
The main AI file is ai/liquid.mdc
, generated from ai/sources/index.liquid
. This entry point pulls together:
- Context from
ai/sources/*.md
files - Dynamic content from
ai/sources/*.liquid
templates
Choose .md
for static content, .liquid
for dynamic generation.
-
Create your rule file:
# Static content touch ai/sources/my-new-rule.md # Or dynamic content touch ai/sources/my-new-rule.liquid
-
Add your content:
<!-- ai/sources/my-new-rule.liquid --> {% for filter in filters %} - `{{ filter.name }}` — {{ filter.description }} {% endfor %}
-
(Optional) Regenerate the rules: The
ai/liquid.mdc
file updates automatically via GitHub Actions, but you can generate it locally anytime.yarn generate:ai
In .liquid
templates, you have access to:
filters
— All available Liquid filterstags
— All Liquid tagsobjects
— All Liquid objects
Check ai/sources/_liquid-rules.liquid
for examples.
Help us make these docs better:
- Fork this repository
- Create your feature branch (
git checkout -b improve-liquid-docs
) - Commit your changes (
git commit -m 'Add array filter examples'
) - Push and create a Pull Request
MIT License. See LICENSE for details.