Skip to content

v0.87.4: docs in the tarball, renderDocument, a help default

Choose a tag to compare

@glw907 glw907 released this 19 Jul 05:41

The docs-on-site engine window: the surface the cairn.pub docs pipeline builds on.

Added

  • createRenderer gains renderDocument, a sibling to renderMarkdown that additionally returns the rendered page's headings (DocHeading[]: id, flattened text, depth), collected from the final rehype tree after rehypeSlug and any site rehypePlugins have run. A page that needs a table of contents or a heading anchor list calls renderDocument instead of re-parsing renderMarkdown's HTML string. renderMarkdown is unchanged. No consumer action.
  • The published docs tree (docs/reference, docs/guides, docs/explanation, docs/tutorial, docs/README.md) now ships inside the npm tarball, so a consumer site can read the docs at build time without a separate checkout. docs/internal, docs/superpowers, and docs/STATUS.md stay out, and the check:package gate asserts both directions. Cost: 501 to 562 files, 1.73 MB to 1.96 MB packed.

Changed

  • The admin's Get Help hand-off now has a default destination: a site that sets no editor.supportContact gets https://cairn.pub/help, cairn's own hosted editor help, instead of the self-serve empty state. An explicit value still wins, and an explicit empty string restores the prior no-link state. A site that relied on unset meaning no link shows the hosted-help link until it sets one of those two.

No breaking changes; no Consumers must: actions.