Skip to content

docs: migrate from Mintlify to Docusaurus 3 - #1174

Merged
planetf1 merged 42 commits into
generative-computing:mainfrom
planetf1:main
Jun 9, 2026
Merged

planetf1 merged 42 commits into
generative-computing:mainfrom
planetf1:main

Conversation

@planetf1

@planetf1 planetf1 commented May 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1176
Fixes #557

👉 Live preview

Browse the site now: https://planetf1.github.io/mellea/

This is the full migration, deployed from planetf1/mellea on every push to main (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 purely
mechanical: canonical frontmatter removed, sidebarTitle renamed to
sidebar_label, a handful of admonitions updated to Docusaurus syntax, and
internal 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-docs instances, the site uses one plugin with
routeBasePath: '/' and both docsSidebar and apiSidebar defined in
sidebars.ts. This avoids SSR failures at the secondary plugin's root route
when only a placeholder API doc exists.

apiSidebar is autogenerated. The docs/docs/api/ tree is wiped and
regenerated 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.py was emitting a
Mintlify-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. mdxify generates <Icon icon="github" .../> as a
source link in every API heading. An Icon MDX component shim is registered
globally; it renders the GitHub SVG and handles the string-form style
attribute that mdxify produces.

onBrokenLinks: 'throw', onBrokenAnchors: 'throw'. The Docusaurus build
fails 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_URL is set to /mellea/
when running on planetf1/mellea and / on generative-computing/mellea.

Visual polish from template comparison. Compared against the
sgd-docusaurus template 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.yml so the
docs 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.ai
lands 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.yml with
bump_type: final (or patch-final) now also triggers a new snapshot-docs
job that commits versioned_docs/version-X.Y.Z/ to main, sets that version
as the new default, and pushes. That push triggers docs-publish.yml via the
docs/** path filter, deploying production. No additional dispatch, no extra UI
step.

For GitHub/CI: the snapshot-docs job runs in the auto-release environment
(same bypass rights as the release job), checks out main, runs
docusaurus docs:version X.Y.Z, rewrites lastVersion in
docusaurus.config.ts via a small helper script, and pushes. The push commit
message (docs: snapshot X.Y.Z) triggers docs-publish.yml naturally. RCs and
dev 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:

  • On a final release (X.Y.Z), links point to blob/vX.Y.Z/ — the exact
    tagged commit on GitHub.
  • On main / dev / pre-release builds (.devN, rcN, etc.), links point
    to blob/main/ — the live default branch, which is the right target when no
    stable 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) and
tooling/docs-autogen/decorate_api_mdx.py (fix_source_links).

What's included

  • docs/docusaurus.config.ts — full config: single-plugin setup, 63 Mintlify
    redirect rules, IBM Plex Sans typography, local search, analytics script;
    Docusaurus versioning config (lastVersion, versions.current,
    docsVersionDropdown in navbar)
  • docs/sidebars.ts — 11-section manual sidebar plus autogenerated API sidebar
  • docs/src/ — custom CSS, Mintlify shim components (Card, CardGroup, Icon,
    Note, Warning), global MDX registration
  • docs/static/CNAME — docs.mellea.ai
  • _category_.json for all 11 doc sections
  • Autogen pipeline updated for Docusaurus mode
  • CI workflow updated: Node 20, npm ci, Docusaurus build, deploy via
    peaceiris/actions-gh-pages
  • .github/workflows/publish-release.yml — new snapshot-docs job (finals only)
  • .github/scripts/set-last-version.mjs — helper to rewrite lastVersion on each release
  • .github/scripts/release.sh — removed explicit docs-publish.yml dispatch for finals (now triggered automatically by the snapshot commit)
  • RELEASE.md — updated to document automatic docs versioning behaviour
  • tooling/docs-autogen/build.py — normalize_version fix for PEP 440 pre-releases
  • tooling/docs-autogen/decorate_api_mdx.py — fix_source_links fix for correct v-prefix logic

Content validation

The build-and-validate CI job runs on every push and PR that touches docs/, 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

Check How What it catches
Broken internal links onBrokenLinks: 'throw' in Docusaurus config Any internal [link](path) that doesn't resolve to a real page
Broken anchors onBrokenAnchors: 'throw' Any #heading reference that doesn't exist on the target page
Duplicate routes onDuplicateRoutes: 'throw' Two pages resolving to the same URL (e.g. from a bad redirect)
Docstring quality gate audit_coverage.py --quality --fail-on-quality --threshold 100 --orphans Any public function with a raise statement missing a Raises: docstring entry; orphaned API pages
CLI reference tests pytest tooling/docs-autogen/test_cli_reference.py Autogenerated CLI reference page coherence
Docusaurus build npm run build TypeScript config errors, MDX parse failures, missing imports

Soft checks — recorded in job summary, non-blocking

Check How Notes
Markdownlint markdownlint-cli on docs/docs/**/*.md Style and formatting issues in hand-authored docs
API docstring coverage audit_coverage.py --threshold 80 Warns if coverage drops below 80% but doesn't block

Pre-existing warnings (not regressions)

Warning Source Status
Broken links/anchors on /api/mellea/* Generated API MDX cross-refs don't match Docusaurus route tree Deferred — requires autogen retargeting
Broken links in tutorials/ Tutorial pages use numbered relative links (./01-foo) that Docusaurus strips Pre-existing in source
Cannot infer update date CI shallow checkout misses git history for generated files Cosmetic, no impact
griffe type annotation warnings Untyped parameters in source code picked up by the API doc generator Pre-existing, unrelated to this PR

These 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)

  1. Enable GitHub Pages on generative-computing/mellea: Settings → Pages → gh-pages branch
  2. Update docs.mellea.ai DNS CNAME from Mintlify to generative-computing.github.io
  3. One-time bootstrap: run cd docs && npm run docusaurus -- docs:version X.Y.Z (using the current latest released tag) and commit the resulting versioned_docs/, versioned_sidebars/, versions.json, and lastVersion config edit to main. This creates the first snapshot so the version dropdown is populated before the next release fires.

What's deferred

  • Full autogen pipeline retargeting (slug migration, sidebar TS emit, MDX
    cross-reference cleanup — root cause of the broken link warnings above)
  • Algolia DocSearch, Cloudflare previews
  • PR preview deploys for contributor PRs (no fork-based preview infrastructure)
  • markdownlint-cli → markdownlint-cli2 bump

Testing

cd docs && npm ci && npm run build   # exits 0
npm run start                         # browse localhost:3000

Spot checks:

  • All 11 sidebar sections expand correctly
  • Dark mode toggles
  • Local search returns results
  • A sample redirect (e.g. /guide/glossary → /reference/glossary) works
  • API Reference navbar item shows the generated API tree
  • API source links on main point to blob/main/ (not a 404 tag URL)

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 29, 2026
@planetf1
planetf1 marked this pull request as ready for review June 1, 2026 15:08
@planetf1
planetf1 requested a review from a team as a code owner June 1, 2026 15:08
@planetf1

planetf1 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Merge coordination — DNS/CNAME cutover required

This 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 docs.mellea.ai points to Mintlify but the gh-pages branch has already switched to Docusaurus, or vice versa.

The cutover steps (from the PR description) need to happen as a coordinated sequence:

  1. Merge this PR
  2. Confirm the gh-pages branch has been deployed successfully on generative-computing/mellea
  3. Enable GitHub Pages on the repo (Settings → Pages → gh-pages branch)
  4. Update docs.mellea.ai DNS CNAME from Mintlify to generative-computing.github.io
  5. Verify the site is live at docs.mellea.ai before decommissioning Mintlify

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.

@planetf1 planetf1 added the do-not-merge/hold Block merging this PR label Jun 1, 2026
@planetf1

planetf1 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

TODO: docs staging/release lifecycle

The current setup deploys continuously from main to gh-pages with no staging gate. This works for now but leaves a gap worth addressing before we're fully settled on the new platform:

  • No staging environment on generative-computing/mellea itself — the fork preview (planetf1.github.io/mellea/) filled that role for this PR but won't scale as a general pattern
  • No versioned docs — the site always reflects main; there's no mechanism to serve docs pinned to a specific release (e.g. docs.mellea.ai/v0.4/)
  • No preview deploys for contributor PRs — external contributors can't preview their doc changes without a fork setup
  • Relationship to package releases is undefined — when a new Python release ships, should the docs deployment be gated or coordinated in any way?

This doesn't need to block this PR, but should be tracked as follow-on work once the Mintlify → Docusaurus cutover is complete.

@planetf1

planetf1 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Update on the staging/release lifecycle TODO

Following 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.

@planetf1 planetf1 mentioned this pull request Jun 1, 2026
@planetf1
planetf1 requested a review from ajbozarth June 1, 2026 15:52
@serjikibm

Copy link
Copy Markdown
Collaborator

Is the link main(unreleased pointing to docs that live on the main branch, while the base (docs.mellea.ai) will point to docs of a particular release?

@serjikibm

Copy link
Copy Markdown
Collaborator

The footer can use some updates. A couple of comments:

  • The hover color for the links makes it unreadable
  • The footer seems too much with sparse content.

I had something like below to make it less attention grabbing. But of course, it's just a matter of style, up to you. The hover color needs updating though, if kept the as is.

image

@serjikibm

serjikibm commented Jun 1, 2026 •

Copy link
Copy Markdown
Collaborator

Minor UI update suggesstion

Current one

image

Alternative

image

In the current one the logo seems lonely :)

@planetf1

planetf1 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Is the link main(unreleased pointing to docs that live on the main branch, while the base (docs.mellea.ai) will point to docs of a particular release?

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...

@planetf1

planetf1 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@serjikibm — footer fixes just pushed (commit e8180b71, preview at https://planetf1.github.io/mellea/):

  1. Hover colour bug fixed — footer link hover was inheriting --ifm-color-primary: #000000 from light-mode, making text invisible on the dark #0d1117 background. Added explicit color: rgba(255,255,255,0.65) / :hover { color: #fff } overrides in custom.css that apply regardless of colour mode.

  2. Footer column title added — the single links group had no title:, which left the logo floating above an untitled list. Added title: "Community".

  3. Homepage hero layout — the 300 px standalone mascot image was creating a very tall sparse hero. Replaced with a side-by-side flex row (120 px logo + tagline text + install command), which should match the more compact layout in your alternative screenshot. Happy to adjust sizing if it is not quite right.

@psschwei

psschwei commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

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?
otherwise looks good to me. nice job on the quick turnaround!

@ajbozarth

Copy link
Copy Markdown
Member

I didn't find time to review this today, I'll take a look tomorrow

@planetf1

planetf1 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@psschwei — good catch. Logo and title now link to https://mellea.ai (commit f04a58ce). The "Docs" navbar item remains for navigating within the docs site. Building on the fork now.

@psschwei

psschwei commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Two tests failed, though I assume those failures are not due to the changes here

FAILED test/backends/test_vision_ollama.py::test_image_block_in_instruction - ollama._types.ResponseError: {"error":{"code":400,"message":"Multimodal data provided, but model does not support multimodal requests.","type":"invalid_request_error"}} (status code: 400)
FAILED test/backends/test_vision_ollama.py::test_image_block_in_chat - ollama._types.ResponseError: {"error":{"code":400,"message":"Multimodal data provided, but model does not support multimodal requests.","type":"invalid_request_error"}} (status code: 400)

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md and docs/CONTRIBUTING_DOCS.md still describe the Mintlify pipeline (branches, mintlify dev, docs.json, dashboard). Contributor-facing only, so no site impact, but will mislead the next docs contributor.

Comment thread docs/docusaurus.config.ts Resolved
Comment thread docs/sidebars.api.ts Resolved
Comment thread .github/workflows/publish-release.yml Resolved
Comment thread .github/workflows/publish-release.yml Resolved
Comment thread docs/docs/examples/index.md Resolved
Comment thread .github/scripts/set-last-version.mjs Resolved

@ajbozarth ajbozarth left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 2026-06-02 at 7 08 30 PM

📷 [screenshot: Docusaurus TOC active-heading highlighting (after)]
Screenshot 2026-06-02 at 7 08 20 PM

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]
Screenshot 2026-06-02 at 7 07 58 PM

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.

Comment thread docs/docusaurus.config.ts Resolved
Comment thread docs/src/components/CardGroup.tsx Resolved
Comment thread docs/docusaurus.config.ts Resolved
Comment thread docs/docusaurus.config.ts Resolved
Comment thread docs/docusaurus.config.ts Resolved
Comment thread docs/docs/index.mdx Resolved
@ajbozarth

Copy link
Copy Markdown
Member

While Claude is down I've re-reviewed my manual review items and closed the comments that were fixed and responded with a few followups. The TOC active-heading highlight is barely distinguishable issue in my top level comment was also addressed well, but I did notice that the highlight bar indents with the TOC level. It's not bad, but if it was unintentional we should fix it
Screenshot 2026-06-04 at 2 19 18 PM

@planetf1

planetf1 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Noting for future reference: the IBM Granite docs migration (ibm-granite/docs#63) uses IBM's standard analytics library (ibm-common.js from 1.www.s81c.com). The setup is a thin analytics.js wrapper that configures window.digitalData and loads the library — it's the same pattern other IBM properties use.

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 (*.ibm.com or equivalent) — without that guard it fires on GitHub Pages previews, which causes two spurious console errors and pollutes the analytics data. That guard was added in the Granite PR.

planetf1 added 10 commits June 8, 2026 11:44
…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
@planetf1

planetf1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Status and next steps

The 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:

  • docs-publish.yml triggers on push to main, builds the Docusaurus site, and deploys to the gh-pages branch
  • docs.mellea.ai CNAME is injected automatically (upstream only; forks are unaffected)
  • Versioning kicks in on the first final release — until then the site shows main (unreleased) only, which is correct

Manual steps needed after merge (one-time):

  1. Enable GitHub Pages on this repo — Settings → Pages → source: gh-pages branch, root /. The first workflow run creates the branch; Pages just needs to be turned on.
  2. DNS cutover — point docs.mellea.ai at GitHub Pages. The CNAME is ready; just needs the DNS record.
  3. Verify redirects — the redirects: block in docusaurus.config.ts covers the known Mintlify URL patterns. Worth a quick spot-check of any high-traffic pages after cutover.

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).

@psschwei

psschwei commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Manual steps needed after merge (one-time):
Enable GitHub Pages on this repo

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.

@ajbozarth

Copy link
Copy Markdown
Member

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:

  1. tooling/docs-autogen/audit_coverage.py:1056 — the missing-symbols error hint still says "then add entries to docs/docs/docs.json navigation." docs.json no longer exists; sidebar entries come from docs/sidebars.ts.

  2. Mintlify references in tooling source — names and comments that read as stale:

    • tooling/docs-autogen/generate-ast.py — module docstring (lines 5, 18), def tree_to_mintlify(...) (586), and argparse help (855, 863)
    • tooling/docs-autogen/decorate_api_mdx.py:853,878 — "Mintlify-only" comment and "Mintlify docs root" help text
    • tooling/docs-autogen/test_mintlify_anchors.py — filename + mintlify_anchor function are still imported by validate.py:308 and decorate_api_mdx.py:670, so rename is non-trivial
  3. docs/scripts/check_docs.py — file_exists_mintlify function and "won't work on Mintlify site" diagnostic strings throughout. The script doesn't appear to be wired into CI or pre-commit, so it may be effectively dead — worth either removing it or updating the messages.

@psschwei

psschwei commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Settings → Pages → source: gh-pages branch, root /. The first workflow run creates the branch; Pages just needs to be turned on.

@planetf1 Chicken and egg problem here: I have to have a branch to turn it on. Any candidate(s)? maybe docs/staging?

planetf1 added 2 commits June 9, 2026 10:15
…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
@planetf1

planetf1 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@psschwei pushed to docs/staging so you should be able to enable github pages now pointed at that branch?

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 gh-pages branch

We'll also need to delete the mintlify config - I'm presuming it's otherwise hamless

planetf1 added 2 commits June 9, 2026 10:36
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
@planetf1 planetf1 removed the do-not-merge/hold Block merging this PR label Jun 9, 2026
@planetf1
planetf1 added this pull request to the merge queue Jun 9, 2026

@psschwei psschwei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's ship it

Merged via the queue into generative-computing:main with commit 87f13d4 Jun 9, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: migrate from Mintlify to Docusaurus + GitHub Pages Version Docs

4 participants