Product and collection files
What they’re for
Section titled “What they’re for”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.
Who uses them
Section titled “Who uses them”- 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.
What’s inside
Section titled “What’s inside”Every family file has the same shape:
- A heading with the item’s handle.
- A
Source:line naming the file’s own path, such asproducts/trail-runner-2.md. - 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.
Sample
Section titled “Sample”# 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.# 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.How they’re built
Section titled “How they’re built”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.
Where they’re served
Section titled “Where they’re served”At the store’s own domain, one level below the documents:
https://your-store.com/apps/shopmd/products/trail-runner-2.mdhttps://your-store.com/apps/shopmd/collections/winter-layers.mdThe .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.
How they stay fresh
Section titled “How they stay fresh”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”.