Tutorial

Shopify section tutorial for Online Store 2.0

A practical walkthrough of how Shopify sections work in modern themes—from JSON templates and section groups to shipping custom sections your merchants can edit.

3 min read · Published 2026-06-08

Knowledge Hub

What you will build in this tutorial mindset

This tutorial explains the full lifecycle of a Shopify section: design HTML, convert to Liquid with schema, add the file to your theme, register it on a JSON template, and let merchants configure it in the editor. Whether you work on Dawn, Prestige, or a custom client theme, the OS 2.0 section model is the same.

Online Store 2.0 fundamentals

Online Store 2.0 replaced static Liquid templates with JSON templates that list sections in order. Each JSON file—index.json, product.json, collection.json—declares which sections appear and their default settings. Merchants reorder and configure sections without code access.

  • Sections are .liquid files in the theme sections/ directory.
  • Templates are .json files in templates/ that reference sections by type.
  • App blocks let apps inject content into designated section slots.
  • Section groups bundle header and footer sections across templates.

Anatomy of a section file

A production section file contains three parts: optional scoped CSS in a style tag, Liquid markup using section.settings and block loops, and a schema block defining editor controls. The outer wrapper should be a single section element with a meaningful class prefix.

Section file structure

<section class="custom-hero">
  <h1>{{ section.settings.heading }}</h1>
</section>

{% schema %}
{ "name": "Custom hero", "settings": [], "presets": [] }
{% endschema %}

Step 1 — Start from HTML

Export markup from Figma, Tailwind, or your component library. Paste it into /converter or the /shopify-section-generator. The tool maps static values to settings, detects repeatables for blocks, and scopes CSS to section.id.

Step 2 — Choose Flat or Block mode

Flat mode suits fixed heroes and announcement bars—content lives in section.settings. Block mode suits FAQs, sliders, and card grids where merchants add rows. /how-shopify-sections-work explains when each mode fits your architecture.

Step 3 — Add the section to your theme

Save the exported file as sections/your-section.liquid in your theme repository. Commit via Git or upload through the theme editor code view. Verify schema validates—invalid JSON prevents the section from appearing.

Step 4 — Register on a JSON template

index.json section entry

{
  "sections": {
    "custom_hero": {
      "type": "custom-hero",
      "settings": { "heading": "Welcome" }
    }
  },
  "order": ["custom_hero"]
}

The type value must match the section filename without .liquid.

Dynamic sections and section groups

Dynamic sections can be added by merchants at runtime through the Add section panel—enabled by presets in schema. Section groups (header, footer) let themes define shared wrapper sections that persist across templates. When building header-adjacent banners, confirm whether your theme expects the section in a group or on individual JSON templates.

Testing and merchant handoff

  • Preview on mobile and desktop in the theme editor.
  • Confirm all settings and blocks render with empty defaults.
  • Document which templates include the section for client training.
  • Match typography tokens to the parent theme for visual consistency.

Next steps in the knowledge hub

Deepen schema skills with /shopify-schema-guide, study block patterns in /dynamic-shopify-blocks-guide, and browse copy-ready Liquid in /shopify-liquid-examples. Theme-specific deployment notes live in /html-to-dawn-theme and sibling theme guides.

Frequently asked questions

Do I need a preset for every custom section?

Yes for sections merchants add via the editor. Presets surface your section in the Add section list. JSON-template-only sections can work without presets if you hardcode them in template JSON.

Can merchants break layout with too many blocks?

They can add many rows. Use max_blocks in schema to cap repeatables and keep editor performance acceptable.

Start converting HTML

Paste your markup and export production-ready Shopify Liquid sections with schema and blocks.

Trust

Built for serious Shopify development

Production-ready sections, validated schema, and workflows theme engineers trust on client projects.

Production-ready output

Export complete section.liquid files with schema, presets, and scoped CSS ready for theme repos.

Built for Shopify developers

Designed for freelancers, agencies, and in-house teams shipping OS 2.0 sections weekly.

OS 2.0 compatible

Output follows Online Store 2.0 conventions—JSON templates, blocks, and valid schema JSON.

Schema validation

Automated checks catch missing presets, invalid setting ids, and common Liquid issues early.

AI-assisted workflow

Optional AI structure detection with deterministic fallback for reliable section generation.

Theme compatibility

Sections align with Dawn, Prestige, Broadcast, Impulse, and custom JSON-template themes.

Shopify SectionsKnowledge Hub

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML