Skip to content

feat: publish material chapters as standard.site documents#6

Merged
fmalcher merged 1 commit into
mainfrom
feat/standard-site-material
Jul 22, 2026
Merged

feat: publish material chapters as standard.site documents#6
fmalcher merged 1 commit into
mainfrom
feat/standard-site-material

Conversation

@fmalcher

Copy link
Copy Markdown
Member

Generalizes the standard.site publisher from blog-only to any content type, so sites with material chapters (angular-buch.com) publish those too.

Changes

  • publish.ts: publishStandardSite(sources: DocumentSource[]) where DocumentSource = { contentType, entries }. Publishes one site.standard.document per non-hidden entry across all sources with path /<contentType>/<slug>; prune spans the union of all live slugs. Guards against a duplicate rkey across content types.
  • build.ts: buildMaterial() now returns its entries; both blog and material sources are passed to the publisher.

Backward compatibility

Sites without a material folder (angular.schule) get an empty material source → identical output (blog-only), same rkeys, no record churn.

Verification

  • npm run typecheck clean.
  • Dry run against angular-buch content: 53 blog + 10 material = 63 documents (hidden material/errata excluded), each with the correct /blog/… or /material/… path. No writes.

Generalize the publisher from blog-only to any content type. It now takes a
list of DocumentSource ({ contentType, entries }) and publishes one
site.standard.document per non-hidden entry across all sources, using
/<contentType>/<slug> as the path. Prune spans the union of all live slugs.

build.ts passes both blog and material sources. Sites without a material folder
(e.g. angular.schule) get an empty material source, so their output is
unchanged.
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