Skip to content

Page data: categories, an authored updated date, scheduled pages, shell highlighting - #62

Merged
StfBauer merged 7 commits into
mainfrom
feat/page-data
Nov 15, 2026
Merged

StfBauer merged 7 commits into
mainfrom
feat/page-data

Conversation

@StfBauer

Copy link
Copy Markdown
Contributor

The page data later 0.5.0 steps filter and sort by, plus shell highlighting.

Categories

  • storefront.categories declares them: key (a URL segment), label, optional description, and aliases (old keys kept after a rename). An alias that is a key, or that two categories claim, is a config problem.
  • A page names them in categories:. An undeclared value fails the page with a "did you mean"; an old key builds as the new category, with a warning naming the page and line.
  • Layouts get page.categories ({ key, label, description }, in the page's order); listing entries carry them; site.categories is every declared category when partials/base lists it.

updated, and git's last commit

  • updated: YYYY-MM-DD, a real date, not before date.
  • It is the source of page.updated, JSON-LD dateModified (WebPage and Article), article:modified_time, and the sitemap's lastmod (which falls back to the page's own date).
  • Visible change: git's last commit is no longer used for any of these. page.modified is retired: a layout declaring it fails with a message to declare page.updated. page.created is unchanged.

Scheduled pages

  • A page whose date is after the build's day (UTC, fixed once per build) stays out of pd build, as a draft does; a scheduled folder index.md holds back its pages until the later date.
  • pd dev shows it, with scheduled: true on its listing entry and a note. The build report: scheduled: N held back (x.md until 2026-12-01).

Shell highlighting

bash, sh, shell, zsh, and console / shell-session for a prompt with its output, in docs, storefront pages and placed content. text stays plain.

Tests

New specs: shell-highlight, storefront-categories, storefront-updated, storefront-scheduled, config validation, and the storefront bench's categories E2E plus a scheduled case in collections. Tests that pinned git's last commit now assert the new rule. Two build specs' fixed clock moved past the bench's dates. The workbench golden snapshot is unchanged.

The CHANGELOG has an Unreleased section with the visible changes.

…er dates a page

page.updated, JSON-LD dateModified, article:modified_time and the sitemap's lastmod
come from the page's own updated (the sitemap falls back to its own date). page.modified
is retired: a layout that declares it is told to declare page.updated instead.
A page whose own date is after the build's day (UTC) stays out of pd build, as a draft
does, with every page under a scheduled folder's index.md; the report names each and the
day it is first built. pd dev shows it, listed with scheduled: true and a note.
@StfBauer
StfBauer merged commit 2afbc0e into main Nov 15, 2026
8 checks passed
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