For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • Overview
  • Learning Plans
    • Developer Foundations
    • Composable Developer
    • Stencil Developer
    • B2B Developer
  • Courses
        • BigCommerce Stencil Technology Stack
        • Handlebars
        • Stencil Objects
        • YAML Front Matter
    • Learning Changelog
Dev Portal
LogoLogo
On this page
  • Resources
CoursesStencil AdvancedModule 2: Technology Stack

YAML Front Matter

Was this page helpful?
Previous

Stencil Objects

Next

Front Matter Objects

Built with

Plan: Stencil Developer

Lesson 6 of 28 · 5 min

YAML Front Matter allows developers to inject additional Stencil objects into the page context. BigCommerce Stencil themes utilize YAML front matter in template pages.

When utilized, Front Matter must be the opening text of a file and must take the form of a valid YAML set between triple-dashed lines.

Below is an example of YAML Front Matter in the Cornerstone home.html file.

YAML Front Matter example

Note: In the example above, theme settings_ refers to where the object is defined in the settings area of the config.json file --- .homepage_new_products_count is an arbitrary name given to a key in the config file. See Theme Styles Configuration for more information.

Resources

  • Technology Stack
  • A Beginner’s Guide to Handlebars
  • Handlebars Helpers Reference
  • Stencil Template Objects
  • YAML Front Matter