Repository navigation
feat(storefront): tag and category pages, tags as objects - #67
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.5.0 step 4.
Tags
storefront.tagsdeclares tags asstorefront.categoriesdeclares 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.tagsand every listing entry'stagsare{ key, label, description, route }, and categories gainroute.{{#each ...tags}}writes{{this}}/{{.}}stops the page, naming the template, the line and the fix ({{label}}). A card schema declaringtagsas strings stops the listing the same way.Tag and category pages
/tags/<key>/,/tags/,/categories/<key>/and/categories/. They render through the skin'slayouts/tag,tags,categoryandcategories.page.termand lists its pages through a query with the newtags: same/categories: same, so views and card checks are the query's. An index getspage.terms.storefront.tagPages/categoryPages:false: off;trueor{ path, title }: on, and a missing layout is a problem.CollectionPage. They are not in the nav or any listing.Search and sharing
article:sectionis the first category's label.ArticlegetsarticleSection.article:tagandkeywordswrite labels.Starter, bench and docs
terms.spec.tsE2E (dev and static).categories.spec.tsmatched neither Playwright project, so it never ran. It is registered now and passes.Not in this PR
sourcein the contracts'LayoutPageUse. The build spec asserts the empty list explicitly.Checks