Skip to content

πŸ“– docs: add Spektacular and port its docs from both repos - #14

Merged
clubanderson merged 4 commits into
mainfrom
add-spektacular
Sep 23, 2026
Merged

clubanderson merged 4 commits into
mainfrom
add-spektacular

Conversation

@clubanderson

@clubanderson clubanderson commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

Adds Spektacular as a sibling project on docs.hivecommons.dev and ports its documentation from both of its repositories.

Pages (all regenerated at build by scripts/sync-sibling-docs.ts)

Sidebar Page Source
Overview / Introduction /docs/spektacular/overview/introduction hivecommons/spektacular README.md
Tutorials / Getting started /docs/spektacular/tutorials/getting-started hivecommons/spektacular-website src/content/tutorials/getting-started.mdx
Tutorials / Unknown criteria /docs/spektacular/tutorials/unknown-criteria hivecommons/spektacular-website src/content/tutorials/unknown-criteria.mdx
Guides / Knowledge base /docs/spektacular/guides/knowledge-base hivecommons/spektacular docs/knowledge-base.md

Every page carries an "also published at spektacular.dev, which is the canonical copy" note so search engines do not treat this site as the primary copy.

Sync changes

  • A file may name its own repo, so a project can pull from more than one source. The website source has its own ref env var, SPEKTACULAR_WEBSITE_DOCS_REF.
  • New scripts/mdx-to-markdown.ts converts Astro MDX to plain Markdown: strips import/export, renders <Step> as ### Step N: heading, <AgentBlock> as a labelled section (Claude Code / Bob / Codex), <YouTubeVideo> as a timestamped link, flattens any unknown component to its text and logs a note, rewrites site-absolute links to spektacular.dev, escapes stray braces, and hands /images/... paths to the sync, which copies them into docs/content/spektacular/images/ (28 tutorial screenshots).
  • New scripts/markdown-fences.ts normalises fences (MD040 language, MD031 blank lines) in both sync scripts, so synced content passes markdownlint at the source. The committed copies were regenerated by running the syncs; this also brings the Hive pages up to the v5 source that πŸ“– sync: retarget Hive docs source from v4 to v5 (hold until first v5 stable promotion)Β #13 retargeted (the committed copies were still from v4).

CI fixes (all three were already red on main)

  • Vitest: Node 22 in the workflow. jsdom 30 depends on undici 8 (engines >= 22.19); on Node 20 the three jsdom suites failed to fork with webidl.util.markAsUncloneable is not a function.
  • TypeScript & ESLint: removed two eslint-disable comments for @typescript-eslint/no-throw-literal, a rule that no longer exists (and is not enabled).
  • markdownlint: fence normalisation above.

Tests

  • scripts/markdown-fences.test.ts, scripts/mdx-to-markdown.test.ts, scripts/sync-sibling-docs.test.ts (project enumeration, dual-source config, headers, link and brand rewriting).

πŸ€– Generated with Claude Code

Spektacular (github.com/hivecommons/spektacular, canonical site spektacular.dev)
transferred into hivecommons from jumppad-labs. Wire it into the sibling-docs
sync alongside hotshot, pluk, rationguard and promptargs:

- sync-sibling-docs.ts: new project entry (README.md required, docs/knowledge-base.md
  optional; SPEKTACULAR_DOCS_REF override) and a jumppad-labs -> hivecommons rewrite
  for repo sub-paths only (Go module path and Homebrew tap still live under jumppad-labs)
- versions.ts / shared.json: extend ProjectId, add versions + projects entries,
  related-projects card and edit URL
- page-map, [...slug] layout/page, sitemap, sidebar, source actions, edit link,
  related projects: enumerate spektacular everywhere the other siblings are
- netlify.toml: /docs/spektacular root redirects
- docs/content/spektacular: committed fallback copies used when the sync is unreachable

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…clean

Extend the sibling-docs sync so the Spektacular section on
docs.hivecommons.dev carries the full documentation set:

- Overview (README) and Knowledge base from hivecommons/spektacular
- "Getting started" and "Dealing with unknown criteria" tutorials from
  hivecommons/spektacular-website (Astro MDX), converted to Markdown by
  the new scripts/mdx-to-markdown.ts: imports/exports stripped, <Step>
  and <AgentBlock> rendered as headed sections, <YouTubeVideo> as a
  timestamped link, unknown components flattened to their text with a
  note in the sync log, site-absolute links pointed at spektacular.dev,
  and referenced images copied under docs/content/spektacular/images/
- a second source per project with its own ref (SPEKTACULAR_WEBSITE_DOCS_REF)
- an "also published at spektacular.dev" canonical note on every page
- sidebar: Overview / Tutorials / Guides

Make the synced content satisfy markdownlint (MD031/MD040) at the source
instead of hand-editing generated files: scripts/markdown-fences.ts adds
a language to bare fences and blank lines around them, applied by both
sync scripts. The committed copies are regenerated by running the syncs
(this also brings the Hive pages up to the v5 source that #13 retargeted).

CI fixes for the three pre-existing red checks:
- Vitest: run on Node 22 (jsdom 30 pulls in undici 8, which needs >= 22.19;
  Node 20 failed with "webidl.util.markAsUncloneable is not a function")
- ESLint: drop eslint-disable comments for the removed rule
  @typescript-eslint/no-throw-literal
- markdownlint: fence normalisation above

Tests: fence normaliser, MDX converter, and the sibling sync config
(every project enumerated, Spektacular pulling from both repos).

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson clubanderson changed the title πŸ“– docs: add Spektacular as a sibling project πŸ“– docs: add Spektacular and port its docs from both repos Sep 23, 2026
clubanderson and others added 2 commits September 23, 2026 11:11
The Netlify site is not producing deploy previews for pull requests, so
CI is the only place the converted MDX pages are proven to compile. Render
the four Spektacular routes through the real docs page (content -> MDX
compile -> evaluate -> DocsLayout) and fail if any of them falls back to
the plain-text <pre> path, loses its H1, or does not route its tutorial
screenshots through /docs-images/.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…oes not read it as JSX

A hard wrap inside the inline code left `<project|repo|all>` at column 0,
which the MDX compiler parses as a JSX tag and fails; the page then rendered
as a raw <pre> dump. Same fix goes upstream to hivecommons/spektacular.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson merged commit 16d86d7 into main Sep 23, 2026
6 of 7 checks passed
@clubanderson
clubanderson deleted the add-spektacular branch September 23, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant