Skip to content
Install on Shopify

Product and collection files

Family files answer questions about one item. Each covered product gets products/<handle>.md and each covered collection gets collections/<handle>.md, where the handle is the item’s handle in Shopify, the same one in its storefront URL.

They hold the facts a product page often leaves out but shoppers ask about: care instructions, fit, warranty, who a collection is for. You write a fact once in a template, apply the template to many items, and ShopMD writes a file for each.

  • Agents that land on a product page can fetch the matching file for the details the page doesn’t state.
  • Marketers and merchandisers write the templates. No code is involved.
  • Developers can build the file’s address from any product or collection URL.

Every family file has the same shape:

  1. A heading with the item’s handle.
  2. A Source: line naming the file’s own path, such as products/trail-runner-2.md.
  3. One section per template section, each listing its fields as - **Label**: value.

Only fields with a value appear. An empty field is left out, never written blank. A template with no filled fields produces no files.

products/trail-runner-2.md — illustrative structure
# trail-runner-2
> Source: products/trail-runner-2.md
## Care
- **Care instructions**: Hand wash cold. Air dry away from direct heat.
## Sizing
- **Fit**: Runs half a size small. Order half a size up.
## Support
- **Warranty**: Two-year warranty against manufacturing defects.
collections/winter-layers.md — illustrative structure
# winter-layers
> Source: collections/winter-layers.md
## About this collection
- **Layering guide**: Start with a merino base layer, add a fleece mid layer, finish with a shell.
- **Who it's for**: Cold-weather hikers and commuters.

Family files are written by code from the merchant’s templates. No AI model is involved.

Templates. A template has fields, each with a label, a section and a value. A product template covers products by collection, by product type, or all products, and the merchant can add or exclude individual products. A collection template covers the collections the merchant names.

Resolving each file. For each covered item, ShopMD gathers every template that covers it:

  • A product covered by two templates gets the fields of both.
  • If two templates fill the same label, the older template wins, and the app shows which one did.
  • A per-item override beats any template value, for when one product is different.
  • Fields are sorted by label, so the file doesn’t reshuffle between runs.

Coverage is worked out from the store’s current products every time files are generated. A product that joins a covered collection next month gets a file on the next run, with no change to the template. A run covers up to 1,000 products.

At the store’s own domain, one level below the documents:

https://your-store.com/apps/shopmd/products/trail-runner-2.md
https://your-store.com/apps/shopmd/collections/winter-layers.md

The .md ending is optional. An address for a handle with no file answers “not found”, exactly like a withdrawn file, so nobody can probe which products a store has covered.

Family files are written when the merchant generates them from the app, and each new run replaces them. Unlike the seven documents, they aren’t held for approval: each run publishes its files directly, and every word in them comes from the merchant’s templates. Product and collection changes in Shopify don’t regenerate family files on their own. Run them again after changing templates or the catalog.

If the merchant empties a template so that an item is no longer described by any template, that item’s file is withdrawn and answers “not found”.