Repository navigation
Rebuild the docs as a Fumadocs site in the ox_lib style - #9
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
package-lock.jsoncommitted.mdast-util-to-markdownis pinned to 2.1.2 throughoverrides. 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)concepts/(the old "How it works")core/:OPX.*split into shared, server and client; plus core config, runtime events,lib/and error codesindex(commands, config, refusal codes),server,client(one heading per contract member),eventsLibmodule, one heading per function.contributingis rewritten for the new site, and the release notes have a PR #57 entry.Checks
scripts/check-api-coverage.shnow reads anchors from MDX (## Name [#id], generated heading ids,<a id="…" />) throughscripts/anchors.mjs. It requires them in the new folders. 1603 published names, all documented.scripts/check-content.mjschecks that every page compiles as MDX, has front matter, and that internal links and their anchors resolve. 217 pages, 0 problems.npm run types:checkpasses, andnpm run buildexports 620 static pages with no errors.Old URLs
The 178 paths the MkDocs site served or already redirected (
lib/legacy.ts) are exported asnoindexpages. Each forwards to its new page and keeps the#fragment: the anchor is looked up in/anchors.json.Deployment
.github/workflows/deploy.ymlruns:npm ci, the content check, the coverage check (skipped on CI), the type check, the build, then a deploy ofout/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