Skip to content

feat(storefront): tag and category pages, tags as objects - #67

Merged
StfBauer merged 5 commits into
mainfrom
feat/term-pages
Nov 16, 2026
Merged

StfBauer merged 5 commits into
mainfrom
feat/term-pages

Conversation

@StfBauer

Copy link
Copy Markdown
Contributor

0.5.0 step 4.

Tags

  • storefront.tags declares tags as storefront.categories declares categories (label, description, old keys). It is optional: without it any tag works, labelled with its key. With it, an undeclared tag stops the page with a "did you mean", and an old key builds with a warning.
  • page.tags and every listing entry's tags are { key, label, description, route }, and categories gain route.
  • Old layouts don't break silently. A template whose {{#each ...tags}} writes {{this}} / {{.}} stops the page, naming the template, the line and the fix ({{label}}). A card schema declaring tags as strings stops the listing the same way.

Tag and category pages

  • Each tag and each category with a published page gets a page, plus an index for each kind: /tags/<key>/, /tags/, /categories/<key>/ and /categories/. They render through the skin's layouts/tag, tags, category and categories.
  • A term page gets page.term and lists its pages through a query with the new tags: same / categories: same, so views and card checks are the query's. An index gets page.terms.
  • storefront.tagPages / categoryPages:
    • left out: on when the skin has the layout; a skin without it gets no pages and no error;
    • false: off;
    • true or { path, title }: on, and a missing layout is a problem.
  • Drafts and scheduled pages never count. An alias's old route redirects through the existing redirect stubs. A page at a generated route is a problem naming both and the fix.
  • The pages are in the sitemap (lastmod is the newest page change) with JSON-LD CollectionPage. They are not in the nav or any listing.
  • No pagination yet.

Search and sharing

  • article:section is the first category's label.
  • The Article gets articleSection.
  • article:tag and keywords write labels.

Starter, bench and docs

  • The starter gets plain layouts for all four kinds of page, and its tags link to their pages. It declares one category, which both articles use.
  • The bench gets the four layouts and declared tags with an alias, plus a new terms.spec.ts E2E (dev and static).
  • The bench's categories.spec.ts matched neither Playwright project, so it never ran. It is registered now and passes.
  • Docs and CHANGELOG are updated.

Not in this PR

  • The workbench's Relationships tab doesn't list generated pages under their layout yet. That needs a new source in the contracts' LayoutPageUse. The build spec asserts the empty list explicitly.

Checks

  • Local gates (Node 24) are green. The storefront E2E specs were updated for the new SEO tags, sitemap entries and layouts.
  • The golden G0 is unchanged (344 files match).

Tags are declared as categories are (label, description, old keys), with the
same checks. tagPages and categoryPages turn the generated pages on or off, or
set their path and the index's title; the two paths must differ.
- Tags can be declared (storefront.tags), as categories are; without
  declarations any tag works, labelled with its key.
- page.tags and every entry's tags are { key, label, description, route },
  and categories gain route. A template that writes a tag as text, or a card
  declaring tags as strings, stops the page and names the fix.
- A page per tag and per category with a published page, and an index of
  each, through the skin's layouts/tag, tags, category and categories;
  storefront.tagPages and categoryPages turn them off, ask for them, or set
  the path and the index's title. Old keys forward. In the sitemap, with
  JSON-LD CollectionPage.
- A query's tags and categories take "same", the page's own.
- article:section and articleSection from the categories; article:tag and
  keywords write labels.
- The bench and the starter get the four layouts; the bench's categories
  E2E is registered and runs.
@StfBauer
StfBauer merged commit 3380765 into main Nov 16, 2026
10 checks passed
@StfBauer
StfBauer deleted the feat/term-pages branch November 16, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant