Shop Section Contract

Shop Section Contract

This note documents the current generator-side storefront contract for bundle-based shop content such as TechnoAntiques.

Content Shape

  • The storefront assumes one leaf bundle per product under a shop section.
  • Each product bundle should contain an index.md plus optional sibling image files.
  • Explicit front matter is the preferred product metadata path.
  • The current theme still supports legacy body-only shop entries for compatibility.

Preferred product front matter:

+++
title = "Victorian Cane Chair"
price = "£90"
+++

Sold/archive items should set:

+++
title = "Vintage Chest of Drawers"
status = "sold"
+++

Legacy Body Inference

For older body-only entries, the theme still infers storefront metadata from markdown body patterns:

  • leading # Heading becomes the product title
  • standalone currency line such as £150 becomes the price
  • standalone status line such as SOLD becomes the inventory/status badge
  • trailing fenced Contact {.primary} block is treated as a signal for the primary enquiry CTA and is not rendered as code
  • empty **Dimensions** markers immediately before price/status are suppressed

All remaining paragraphs are rendered as the product description.

Front Matter Override Path

When present, these page params override inferred values:

  • price
  • status
  • sold
  • cta_href
  • cta_label
  • marketplace_links
  • shop_links
  • product_links

marketplace_links and related fields should be a list of maps with label and href.

Template Entry Points

  • Section list: layouts/shop/list.html
  • Product single: layouts/shop/single.html
  • Shared contract helper: layouts/partials/shop/product-contract.html