Repository navigation
docs: migrate from Mintlify to Docusaurus 3 - #1174
Conversation
Merge coordination — DNS/CNAME cutover requiredThis PR is ready from a code and CI perspective, but it cannot be merged in isolation. Merging without coordinating the DNS change will cause a gap where The cutover steps (from the PR description) need to happen as a coordinated sequence:
There's also a bit more planning needed on the exact sequence — e.g. whether to keep Mintlify serving in parallel for a short overlap period, who holds the DNS access, whether there are any Mintlify-side redirects in flight that need to be replicated first. Suggest we pick a short timeslot (30 min should be enough) where a few of us with DNS/GitHub Pages access are available to walk through this together. Happy to coordinate that once reviewers have signed off. |
TODO: docs staging/release lifecycleThe current setup deploys continuously from
This doesn't need to block this PR, but should be tracked as follow-on work once the Mintlify → Docusaurus cutover is complete. |
Update on the staging/release lifecycle TODOFollowing up on the gap analysis above — this PR now addresses two of the four points: ✅ Versioned docs (now done): Docusaurus versioning is wired into `publish-release.yml`. From the next final release onwards, each `publish-release` dispatch with `bump_type: final` or `patch-final` automatically snapshots the current docs as `versioned_docs/version-X.Y.Z/`, updates `lastVersion`, and pushes to `main` — which triggers `docs-publish.yml` via the `docs/**` path filter. Production defaults to the latest release; a navbar dropdown gives access to `main` (unreleased) and any prior snapshot. No manual release-manager step needed. ✅ Relationship to package releases (now defined): Docs versioning is fully coupled to the Python release pipeline. RC bumps skip snapshot creation; only `final` and `patch-final` create a new default version. The bootstrap step (creating the first snapshot from the current latest tag) is documented in the PR description and needs to happen once after merge. ❌ Staging environment: still not addressed — no staging gate on `generative-computing/mellea` itself. The fork preview (`planetf1.github.io/mellea/`) remains the working substitute for this PR. ❌ PR preview deploys for contributor PRs: still not addressed. Needs separate infrastructure (e.g. Vercel/Netlify, or a dedicated `gh-pages` preview workflow per PR). These two remaining items can be tracked as separate issues post-cutover. |
|
Is the link |
All is hosted on the same github pages branch. The UI defaults to showing the last released version. The user can click that to get a dropdown of other versions including 'main (unreleased)'. That's a way around the separate staging site we had before and seems to be a common pattern. Harder to properly test since we don't currently have a frozen release. Suggestion is we place close attention when we do the release... |
|
@serjikibm — footer fixes just pushed (commit
|
|
One small thing I noticed: both "Mellea" link in the top bar link back to the main docs page. should one/both link to the main mellea.ai page instead? |
|
I didn't find time to review this today, I'll take a look tomorrow |
|
@psschwei — good catch. Logo and title now link to |
|
Two tests failed, though I assume those failures are not due to the changes here |
ajbozarth
left a comment
There was a problem hiding this comment.
I had Claude do a in-depth review, the following is what it found. I also had it draft me a in-depth manual review doc that I plan to walk through later tonight/tomorrow.
Verified the Docusaurus build locally with both DOCS_BASE_URL=/ and /mellea/. Both succeed cleanly with no broken-link/anchor warnings. Sidebar parity vs. the old Mintlify nav is exact (67 leaf pages, none added or missing). All 63 redirect targets resolve to real pages.
Inline comments cover the file-anchored items. Two more that don't sit on changed lines:
Autogen still emits sidebarTitle:. tooling/docs-autogen/generate-ast.py:365 (new_front.append(f"sidebarTitle: {yaml_quote(title_value)}")) and tooling/docs-autogen/generate_cli_reference.py:471. Every regenerated API page and the CLI reference write the Mintlify key. Docusaurus ignores it, so the build passes, but the sidebar falls back to the long title: (mellea.core.sampling) instead of a short label. Hand-authored pages were converted to sidebar_label: in this PR; this is the missed half.
Stale Mintlify reference in published doc. docs/docs/community/contributing-guide.md:342 still says "Mintlify renders the frontmatter title". This page is published — should be retargeted to Docusaurus or made tool-agnostic.
Awareness only
docs/PUBLISHING.mdanddocs/CONTRIBUTING_DOCS.mdstill describe the Mintlify pipeline (branches,mintlify dev,docs.json, dashboard). Contributor-facing only, so no site impact, but will mislead the next docs contributor.
There was a problem hiding this comment.
Walked through my manual review doc against https://planetf1.github.io/mellea/. New findings below — most are visual/runtime issues that wouldn't have surfaced in source review. Inline comments anchored to the relevant config/source lines.
Two items don't sit on clean inline anchors:
TOC active-heading highlight is barely distinguishable. The current item is differentiated only by a slight grey shift — on a long page (e.g. the glossary) it's easy to miss entirely; before/after screenshots below show the gap. Mintlify rendered a left-side vertical accent bar. Fixable with CSS on .table-of-contents__link--active (border-left + bolder color), or by swizzling @theme/TOC.
📷 [screenshot: Mintlify TOC active-heading highlighting (before)]

📷 [screenshot: Docusaurus TOC active-heading highlighting (after)]

Sidebar scrollbar offset from window right edge. The right-hand TOC scrollbar sits noticeably inset from the right edge of the viewport rather than flush against it (applies to both docs sidebar and API sidebar).
📷 [screenshot: right-hand TOC scrollbar sitting inset from window's right edge, with empty page background between scrollbar and edge]

Likely a layout-container width mismatch between the page wrapper and the sidebar's overflow-y container. May share root cause with the footer issue (item 4 inline) — both the inset scrollbar and the empty horizontal space in the footer suggest a wrapper that's narrower than the viewport while the navbar/footer use full width. Worth investigating once together.
|
Noting for future reference: the IBM Granite docs migration (ibm-granite/docs#63) uses IBM's standard analytics library ( If mellea ever needs IBM analytics, the same approach could be applied here. Worth flagging that the script should be guarded to only load on production domains ( |
…unction
The audit_nav_orphans() function searched for docs.json / mint.json
(Mintlify artefacts) to find MDX files not referenced in navigation.
Both files are gone in the Docusaurus migration; the API sidebar now
uses {type: 'autogenerated', dirName: 'api'} which makes orphaned
files structurally impossible. The function was a permanent no-op.
Also removes the apidocs-orphans poe task from pyproject.toml and
fixes AGENTS.md §12 to reference Docusaurus terminology
(sidebar_label, "Docusaurus renders") instead of Mintlify equivalents.
Assisted-by: Claude Code
Signed-off-by: Nigel Jones <[email protected]>
Flag was removed from audit_coverage.py in the previous commit but the workflow invocation was not updated in sync. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
Without .md, Docusaurus treats relative links as raw URL paths and resolves them without the baseUrl prefix. This fails onBrokenLinks: 'throw' on deployments with a non-root baseUrl (e.g. the fork preview at /mellea/). With .md, Docusaurus treats the link as a doc reference and handles the baseUrl correctly. Restores .md on the two safety-guardrails links in examples/index.md and corrects the "no .md extension" rule in AGENTS.md and CONTRIBUTING_DOCS.md to match Docusaurus v3 actual behaviour. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
The snapshot-docs job in publish-release.yml handles the first version snapshot automatically on the first final release. No manual bootstrap is needed. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
mdxify hardcodes `style="width: 14px; height: 14px;"` on the GitHub Icon component. Inline styles win over the stylesheet, so the icon rendered at a fixed 14 px regardless of whether it appeared in an h2, h3, or h4 heading. Add a `normalize_icon_size` pass to decorate_api_mdx.py that replaces the pixel dimensions with `0.85em` so the icon scales with the surrounding heading's font size. Remove the now-redundant CSS width/height rules on `article h* sup svg` — the inline style is the single source of truth for icon sizing. Also add a mypy override to suppress the pre-existing import-not-found error for `cpex`, a private optional dependency not available in all environments. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
The homepage hero div uses `display:flex` without `flexWrap`, so on narrow viewports the mascot image and paragraph text stay side by side and the text gets squeezed. Adding `flexWrap:'wrap'` lets the image stack above the text on mobile. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
Four review findings from @ajbozarth: **API landing page (threads 1 & 2)** Two pages claimed to be the API reference home: `api-reference.mdx` (generated, gitignored, linked from homepage) and `api/index.md` (static placeholder, linked from navbar). Resolve by redirecting `generate_landing_page()` to write `api/index.md` instead of `api-reference.mdx`. The navbar already links to `api/` via `apiSidebar`, so no sidebar change is needed. Update the homepage card to `/api` and remove `docs_root` from the function signature (now unused). Drop the `!docs/docs/api/index.md` gitignore exception and the `docs/docs/api-reference.mdx` ignore entry — both superseded. The `apidocs-clean` task already removes `docs/docs/api/` so nothing extra is needed there. **Note/Warning shims (thread 3)** `Note.tsx` and `Warning.tsx` were imported in `MDXComponents.tsx` but never used in any doc page or generated MDX. Remove the components and their imports. Also drop the now-unused `import React` line. **validate.py table entry (thread 4)** `validate.py` was referenced in the pipeline description (line 77) but absent from the key-files table. Add it. Also add `.fastembed_cache/` directories to `.gitignore` — model weight caches downloaded at runtime should not be tracked. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
**GITHUB_TOKEN deploy path (publish-release.yml)** A GITHUB_TOKEN push cannot trigger a new workflow run. The snapshot-docs job was relying on a push-to-main to auto-trigger docs-publish.yml, which silently never fires. Add an explicit `gh workflow run docs-publish.yml` dispatch step after the snapshot push (workflow_dispatch is exempt from the no-re-trigger rule). Add `actions: write` permission to the job. Update the misleading comments in release.sh, RELEASE.md, and PUBLISHING.md. **GitHub Actions injection (docs-publish.yml)** Route `steps.*.outcome` expressions through env: vars in the job-summary run: block, per the AGENTS.md injection-safety rule. **AGENTS.md §10 self-review command** Remove `--orphans` flag removed from audit_coverage.py in a prior commit; running the old command errors on `unrecognised arguments`. **decorate_api_mdx.py** - Remove dead inject_sidebar_fix function and its constants (Mintlify-only, call site already commented out); update module docstring pass list. - Narrow `except Exception` to `except (AttributeError, ValueError)` on the member.kind filter. **Component compat comments** Add comments to Card.tsx (icon prop) and CardGroup.tsx (cols prop) noting they are accepted for Mintlify MDX compat but not rendered/used. **analytics.js** Update stale header comment (was "Mintlify settings", now Docusaurus). Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
docs/static/CNAME was copied unconditionally into every build, so fork deployments claimed docs.mellea.ai as their custom domain. Remove the file from static/ and inject it via peaceiris cname: input only on upstream (generative-computing/mellea). Forks serving from their own GitHub Pages URL are unaffected. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
**tooling/docs-autogen/README.md** — full rewrite: - Remove all Mintlify-specific content (docs.json, SidebarFix, apidocs-orphans, Mintlify dev server, api-reference.mdx, Known Issues section) - Update pipeline overview: api/index.md landing page, normalize_rst_backticks pass in step 2, step 3 (nav rebuild) noted as auto-skipped in Docusaurus mode - Correct apidocs-quality description (includes methods by default, not excluded) - Add links to docs/PUBLISHING.md and docs/CONTRIBUTING_DOCS.md at the top - Update file structure and troubleshooting table **docs/PUBLISHING.md** — remove stale `uv run poe apidocs-orphans` reference (task was deleted when --orphans was removed from audit_coverage.py) **.github/workflows/docs-publish.yml** — add comment to release: trigger explaining it only fires for manually-created releases (automated releases use GITHUB_TOKEN which cannot trigger new workflow runs) Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
…-off-by When an agent makes commits while the human is directing the work, both trailers are required: the human's Signed-off-by (for DCO) and the agent's Assisted-by. The previous wording implied the human always adds the sign-off themselves, which breaks DCO when the agent commits. Signed-off-by: Nigel Jones <[email protected]> Assisted-by: Claude Code
Status and next stepsThe PR is code-complete and ready to merge. All review threads are resolved, CI is green, and commits are now DCO-signed. What merging does automatically:
Manual steps needed after merge (one-time):
Proposed: do the manual steps Tuesday (rather than Wednesday, which is release day — better to have a day's buffer in case of DNS propagation delays or any redirect gaps before release activity picks up). |
I guess technically we could also do this pre-merge too (?) since no one is using the pages URL. Assuming that's right, let me know if/when you want me to enable pages. |
|
Three stale-Mintlify cleanups from my approving review not yet addressed. Still non-blocking and could be done in a follow up, but flagging here for visibility:
|
@planetf1 Chicken and egg problem here: I have to have a branch to turn it on. Any candidate(s)? maybe |
…s Signed-off-by" This reverts commit 7344b07. Signed-off-by: Nigel Jones <[email protected]> Assisted-by: Claude Code
Four stale Mintlify-era references flagged by @ajbozarth in review: - audit_coverage.py: error hint for missing symbols now points to docs/sidebars.ts (replaces obsolete docs/docs/docs.json reference) - generate-ast.py: update module docstring, rename tree_to_mintlify -> tree_to_nav, update argparse help text - decorate_api_mdx.py: update SidebarFix comment and --docs-root help text - check_docs.py: rename file_exists_mintlify -> file_exists_docs, update link-check description and diagnostic strings Signed-off-by: Nigel Jones <[email protected]> Assisted-by: Claude Code
|
@psschwei pushed to In theory we could point to there initially, then merge PR (remove the hold label first), then after CI on the merge has completed, we can flip back to the We'll also need to delete the mintlify config - I'm presuming it's otherwise hamless |
A single connection reset from registry.ollama.ai fails the entire quality run. Wrap the pull in a retry loop (3 attempts, 15s backoff) to handle transient network errors without requiring a manual re-run. Signed-off-by: Nigel Jones <[email protected]> Assisted-by: Claude Code
3×15s was conservative; 5×20s gives ~2 minutes of retry headroom for sustained brief outages without masking real failures. Signed-off-by: Nigel Jones <[email protected]> Assisted-by: Claude Code
87f13d4




Fixes #1176
Fixes #557
👉 Live preview
Browse the site now: https://planetf1.github.io/mellea/
This is the full migration, deployed from
planetf1/melleaon every push tomain(on my fork). All 11 sidebar sections are live. Use it to review navigation, dark mode, search, and content before voting to merge.What this does
This PR replaces the Mintlify documentation setup with a Docusaurus 3.10 site
that builds cleanly and deploys to GitHub Pages via a single CI job.
The content of
docs/docs/is preserved almost entirely — changes are purelymechanical: canonical frontmatter removed,
sidebarTitlerenamed tosidebar_label, a handful of admonitions updated to Docusaurus syntax, andinternal links de-prefixed to match the way Docusaurus strips numeric filename
prefixes from doc IDs (
01-your-first-generative-program→your-first-generative-program).The homepage has been simplified: the four lower card grids (How Mellea works,
Key patterns, Backends, How-to guides) are removed. They were teasers for content
that already lives in the sidebar — keeping only the four primary nav cards (Get
started, Tutorial, Code examples, API reference) gives a cleaner first impression.
Key design decisions
Single docs plugin, two named sidebars. Rather than two separate
@docusaurus/plugin-content-docsinstances, the site uses one plugin withrouteBasePath: '/'and bothdocsSidebarandapiSidebardefined insidebars.ts. This avoids SSR failures at the secondary plugin's root routewhen only a placeholder API doc exists.
apiSidebaris autogenerated. Thedocs/docs/api/tree is wiped andregenerated by the autogen pipeline on every CI run. A static
{type:'doc'}entry in the sidebar would be deleted on each build;
{type:'autogenerated', dirName:'api'}picks up whatever the pipeline emits.SidebarFix injection disabled.
decorate_api_mdx.pywas emitting aMintlify-specific
import { SidebarFix } from "/snippets/SidebarFix.mdx"into every generated API MDX file. Step 3 in
decorate()is now a no-op.<Icon>shim added.mdxifygenerates<Icon icon="github" .../>as asource link in every API heading. An
IconMDX component shim is registeredglobally; it renders the GitHub SVG and handles the string-form
styleattribute that
mdxifyproduces.onBrokenLinks: 'throw',onBrokenAnchors: 'throw'. The Docusaurus buildfails on any broken internal link or anchor in static docs — this is stricter
than Mintlify, which ran cloud-side and didn't surface link failures in CI. The
generated API MDX files produce some cross-reference warnings that are pre-existing
and do not break the build today; fixing them requires autogen pipeline retargeting
(deferred, tracked in "What's deferred" below).
Fork/upstream base URL separation.
DOCS_BASE_URLis set to/mellea/when running on
planetf1/melleaand/ongenerative-computing/mellea.Visual polish from template comparison. Compared against the
sgd-docusaurustemplate prototype. Adopted: Prism github/dracula code themes,article max-width (48rem), rich dark-mode backgrounds, navbar border separator,
uppercase sidebar section headers, increased line height. Kept: IBM Plex fonts,
monochrome primary palette, single-plugin routing.
Docs versioning is fully integrated into the release pipeline.
Docusaurus's built-in versioning is wired into
publish-release.ymlso thedocs lifecycle tracks the Python package lifecycle automatically — no manual
steps added to the release checklist.
For users: after the first final release ships, visiting
docs.mellea.ailands on the latest released version by default. A version dropdown in the
navbar lets anyone switch to
main(unreleased, labelled "main (unreleased)"with a banner) or any prior release snapshot. Visiting today, before the first
snapshot, shows
main(which is the only version).For the release manager: nothing changes. Running
publish-release.ymlwithbump_type: final(orpatch-final) now also triggers a newsnapshot-docsjob that commits
versioned_docs/version-X.Y.Z/tomain, sets that versionas the new default, and pushes. That push triggers
docs-publish.ymlvia thedocs/**path filter, deploying production. No additional dispatch, no extra UIstep.
For GitHub/CI: the
snapshot-docsjob runs in theauto-releaseenvironment(same bypass rights as the
releasejob), checks outmain, runsdocusaurus docs:version X.Y.Z, rewriteslastVersionindocusaurus.config.tsvia a small helper script, and pushes. The push commitmessage (
docs: snapshot X.Y.Z) triggersdocs-publish.ymlnaturally. RCs anddev bumps skip this job entirely (
if: bump_type == 'final' || 'patch-final').API reference source links use the correct git ref.
The GitHub source links rendered next to every function/class heading in the API
reference (
View source/ the GitHub icon) now resolve correctly:X.Y.Z), links point toblob/vX.Y.Z/— the exacttagged commit on GitHub.
main/ dev / pre-release builds (.devN,rcN, etc.), links pointto
blob/main/— the live default branch, which is the right target when nostable tag exists for that version.
Previously, dev builds produced
blob/v0.7.0.dev0/which 404s on GitHub(PEP 440 pre-release suffixes have no corresponding git tag). The fix lives in
tooling/docs-autogen/build.py(normalize_version) andtooling/docs-autogen/decorate_api_mdx.py(fix_source_links).What's included
docs/docusaurus.config.ts— full config: single-plugin setup, 63 Mintlifyredirect rules, IBM Plex Sans typography, local search, analytics script;
Docusaurus versioning config (
lastVersion,versions.current,docsVersionDropdownin navbar)docs/sidebars.ts— 11-section manual sidebar plus autogenerated API sidebardocs/src/— custom CSS, Mintlify shim components (Card, CardGroup, Icon,Note, Warning), global MDX registration
docs/static/CNAME—docs.mellea.ai_category_.jsonfor all 11 doc sectionsnpm ci, Docusaurus build, deploy viapeaceiris/actions-gh-pages.github/workflows/publish-release.yml— newsnapshot-docsjob (finals only).github/scripts/set-last-version.mjs— helper to rewritelastVersionon each release.github/scripts/release.sh— removed explicitdocs-publish.ymldispatch for finals (now triggered automatically by the snapshot commit)RELEASE.md— updated to document automatic docs versioning behaviourtooling/docs-autogen/build.py—normalize_versionfix for PEP 440 pre-releasestooling/docs-autogen/decorate_api_mdx.py—fix_source_linksfix for correctv-prefix logicContent validation
The
build-and-validateCI job runs on every push and PR that touchesdocs/,mellea/, or the autogen tooling. Compared to Mintlify (cloud-hosted, no local build step — link failures were invisible in CI), Docusaurus adds transparent, local validation with explicit severity levels.Hard failures — block CI
onBrokenLinks: 'throw'in Docusaurus config[link](path)that doesn't resolve to a real pageonBrokenAnchors: 'throw'#headingreference that doesn't exist on the target pageonDuplicateRoutes: 'throw'audit_coverage.py --quality --fail-on-quality --threshold 100 --orphansraisestatement missing aRaises:docstring entry; orphaned API pagespytest tooling/docs-autogen/test_cli_reference.pynpm run buildSoft checks — recorded in job summary, non-blocking
markdownlint-cliondocs/docs/**/*.mdaudit_coverage.py --threshold 80Pre-existing warnings (not regressions)
/api/mellea/*tutorials/./01-foo) that Docusaurus stripsCannot infer update dateThese warnings existed under Mintlify too — they just weren't visible because Mintlify's build was opaque to CI.
Going live (after merge — not part of this PR)
generative-computing/mellea: Settings → Pages →gh-pagesbranchdocs.mellea.aiDNS CNAME from Mintlify togenerative-computing.github.iocd docs && npm run docusaurus -- docs:version X.Y.Z(using the current latest released tag) and commit the resultingversioned_docs/,versioned_sidebars/,versions.json, andlastVersionconfig edit tomain. This creates the first snapshot so the version dropdown is populated before the next release fires.What's deferred
cross-reference cleanup — root cause of the broken link warnings above)
markdownlint-cli→markdownlint-cli2bumpTesting
Spot checks:
/guide/glossary→/reference/glossary) worksmainpoint toblob/main/(not a 404 tag URL)