Skip to content

Rebuild the docs as a Fumadocs site in the ox_lib style - #9

Merged
dop42 merged 5 commits into
mainfrom
docs/fumadocs
Oct 2, 2026
Merged

dop42 merged 5 commits into
mainfrom
docs/fumadocs

Conversation

@dop42

@dop42 dop42 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Replaces the MkDocs site with a Fumadocs + Next.js static site modelled on the overextended docs (ox_lib / ox_inventory / ox_core): same stack, sidebar shape and page style. Snippets explain; prose is kept short.

Stack

  • fumadocs-core / fumadocs-ui 16.10.4, fumadocs-mdx 15.0.12, Next 16.2.9, React 19, Tailwind v4, Orama static search. These are the same versions the reference uses.
  • npm, with package-lock.json committed.
  • mdast-util-to-markdown is pinned to 2.1.2 through overrides. Version 2.1.3 sends Fumadocs' processed-markdown stringifier into infinite recursion on any **bold**, and the reference lockfile also resolves 2.1.2.
  • output: 'export', basePath: '/opx77_doc', trailingSlash: true. Dark theme by default, neutral palette, OPX//77 branding.

Content (content/docs, 217 pages)

  • getting-started/: install (as steps), configure, troubleshooting.
  • opx_infinity/:
    • overview and module list
    • concepts/ (the old "How it works")
    • core/: OPX.* split into shared, server and client; plus core config, runtime events, lib/ and error codes
    • one folder per module (33): index (commands, config, refusal codes), server, client (one heading per contract member), events
  • opx_lib/: one page per Lib module, one heading per function.
  • creators/: one page per server export (33) and per client export (13), the shared conventions, and the public events.
  • guides/, migration/: contributing is rewritten for the new site, and the release notes have a PR #57 entry.
  • Every fact from the old pages is kept. Every anchor id is kept too, except section ids that became their own page.
  • opx_infinity PR #57 (0c447bc) is folded in. Its changes are listed in the release notes.

Checks

  • scripts/check-api-coverage.sh now reads anchors from MDX (## Name [#id], generated heading ids, <a id="…" />) through scripts/anchors.mjs. It requires them in the new folders. 1603 published names, all documented.
  • New: scripts/check-content.mjs checks that every page compiles as MDX, has front matter, and that internal links and their anchors resolve. 217 pages, 0 problems.
  • npm run types:check passes, and npm run build exports 620 static pages with no errors.

Old URLs

The 178 paths the MkDocs site served or already redirected (lib/legacy.ts) are exported as noindex pages. Each forwards to its new page and keeps the #fragment: the anchor is looked up in /anchors.json.

Deployment

.github/workflows/deploy.yml runs: npm ci, the content check, the coverage check (skipped on CI), the type check, the build, then a deploy of out/ to Pages. Pull requests build but do not deploy. The repository's Pages source is already GitHub Actions, so nothing needs to change in the settings.

🤖 Generated with Claude Code

sh104 and others added 5 commits October 2, 2026 15:04
The owner wants the docs to look and read like the overextended (ox_*)
documentation, which is a Fumadocs site. This adds the same stack, at
the same versions (fumadocs-core/ui 16.10.4, fumadocs-mdx 15.0.12,
Next 16.2.9, React 19, Tailwind v4, Orama static search), built with
npm and exported to out/ under basePath /opx77_doc for GitHub Pages.

- Dark theme by default, neutral palette, OPX//77 branding.
- mdast-util-to-markdown is pinned to 2.1.2 through overrides: 2.1.3
  sends Fumadocs' processed-markdown stringifier into infinite recursion
  on any **strong** text (the reference lockfile resolves 2.1.2 too).
- scripts/check-content.mjs compiles every page as MDX and checks front
  matter, internal links and their anchors, without a Next build.
  scripts/anchors.mjs is the one definition of an anchor (explicit
  heading id, generated heading id, or id attribute), shared with the
  API coverage check.
- The Pages workflow now installs with npm ci, checks content and types,
  builds and deploys out/; pull requests build without deploying.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every page of the MkDocs site is rewritten under content/docs, with the
old pages (and the framework code) as the source of truth. Every fact
is kept; the prose is cut to the overextended density: a one-line
description, the call as a Lua snippet, typed Parameters / Returns
lists and a tiny example.

- getting-started/: install (as steps), configure, troubleshooting.
- opx_infinity/: overview and module list, concepts/ (the old How it
  works), core/ (OPX.* split into shared/server/client, core config,
  runtime events, the lib/ shared library, error codes), then one
  folder per module: index (commands, config, refusal codes), server
  and client contracts (one heading per member), events.
- opx_lib/: one page per Lib module, one heading per function.
- creators/: one page per server export and per client export, the
  shared conventions, and the public events.
- guides/ and migration/, with contributing rewritten for the new site.

Every anchor id the old pages defined is kept, except section ids that
became their own page, so the coverage check and old links still land.

Folds in opx_infinity PR #57 (0c447bc): the elevator key, the progress
cancel key, weather commands through OPX.Command, read-backs carrying
kind, one blip per garage, ammo stacking to AMMO.MAX, the dealership
garage choice and opx77_company_pending ledger, inventory
HolsterWeapon, OPX.Storage.EnsureIndex and OPX.Schema.AddIndexes, the
removed config keys and the new downed SUSPENDERS default.

Accordion/Accordions are registered as MDX components, and page titles
name the folder a page sits in ("Server - weather").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check-api-coverage.sh still boots opx_infinity through
dump-surface.lua, but now reads anchors from content/docs through
scripts/anchors.mjs (explicit [#id] heading ids, generated heading ids
and id attributes - exactly what Fumadocs renders) and requires them in
the new folders: opx_infinity/<module>/ for contract members, commands
and config keys, opx_infinity/core/ for runtime config and aliases,
creators/ for exports, opx_lib/ for Lib functions.

The opx_lib function grep now accepts digits after the first letter, so
Lib.Math.Distance2D is required like every other function. 1603
published names, all documented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every path the MkDocs site served, and every path its redirects plugin
already forwarded (178 in all, lib/legacy.ts), is exported as a small
noindex page that forwards to its new home. A #fragment survives: the
page looks the anchor up in /anchors.json (built from the same anchor
reader as the checks) and lands on the page that now defines it, with a
meta refresh as the no-JS fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MkDocs sources (mkdocs.yml, requirements.txt, docs/) left with the
content rewrite. The README now describes the new stack, the content
layout, the page style, how to add a module, the local commands, the
coverage check, the old-URL redirects and the deployment (the Pages
source stays GitHub Actions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dop42
dop42 merged commit 6d3c74e into main Oct 2, 2026
2 checks passed
@dop42
dop42 deleted the docs/fumadocs branch October 2, 2026 13:34
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