Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5ca7a61
chore(offlinedocs): migrate to Fumadocs (render parity, single version)
nickvigilante Jul 21, 2026
ba2c2b4
fix(offlinedocs): align pnpm overrides with the workspace root
nickvigilante Jul 21, 2026
2cf1792
fix(offlinedocs): address review feedback on the Fumadocs migration
nickvigilante Jul 21, 2026
f0a1084
fix(offlinedocs): label the homepage "Home" instead of a second "About"
nickvigilante Jul 21, 2026
7237493
feat(offlinedocs): add external-link and OS-switcher icons
nickvigilante Jul 21, 2026
b68e8ab
fix(offlinedocs): run the dev server on port 26337 instead of 3000
nickvigilante Jul 23, 2026
43b7bcd
feat(offlinedocs): add offline client-side search
nickvigilante Jul 23, 2026
6dda772
fix(offlinedocs): reconcile pnpm lockfile with manifest
nickvigilante Aug 4, 2026
88f4f30
fix(offlinedocs): remove dead code and no-op config
nickvigilante Aug 4, 2026
6e4ef61
fix(offlinedocs): keep OS tab sets from rendering empty
nickvigilante Aug 4, 2026
120173a
feat(offlinedocs): align docs theme with Coder product
chrifro Aug 12, 2026
2ff9c8a
fix(offlinedocs): wrap a long import in os-tab.tsx for prettier
nickvigilante Aug 12, 2026
c8dd97a
fix(offlinedocs): address review feedback and flatten the TOC rail
nickvigilante Aug 12, 2026
9718b6e
fix(offlinedocs): fail sync on unresolved inter-doc links and fix sty…
nickvigilante Aug 12, 2026
6970933
test(offlinedocs): add mdx-plugin tests, drop lucide-react, guard images
nickvigilante Aug 13, 2026
f94d4c5
docs(offlinedocs): document the details-accordion close-delimiter lim…
nickvigilante Aug 13, 2026
44da36d
fix(offlinedocs): address round-4 review of the Fumadocs migration
nickvigilante Aug 14, 2026
b554386
docs(offlinedocs): clarify config comments and add file docstrings
nickvigilante Aug 14, 2026
ca6cf72
offlinedocs: address round-5 review findings (frontmatter titles, inl…
nickvigilante Aug 14, 2026
9417b0b
offlinedocs: parse frontmatter with fumadocs-core to fix escaped quotes
nickvigilante Aug 18, 2026
53585fa
offlinedocs: address round-7 review nits (CRF-51/53/54/55/56/57)
nickvigilante Aug 18, 2026
02fc424
offlinedocs: clear stale .source in sync so lint/build regenerate types
nickvigilante Aug 18, 2026
3498c96
test(offlinedocs): make OSTab first-visit seeding test able to fail
nickvigilante Aug 18, 2026
c33cd5c
offlinedocs: address round-8 review findings (CRF-58/59/61/62)
nickvigilante Aug 18, 2026
10049d6
docs(offlinedocs): document intentional strictness of callout MARKER …
nickvigilante Aug 19, 2026
28dca13
docs(offlinedocs): pin CRF-58 autolink branches and trim duplicated c…
nickvigilante Aug 19, 2026
0b48ffd
fix(offlinedocs): guard against empty .source generation before tsc
nickvigilante Aug 20, 2026
90d913f
fix(offlinedocs): run .source guard after next typegen
nickvigilante Aug 20, 2026
df499fe
docs(offlinedocs): drop monitoring.md corpus edit from the migration PR
nickvigilante Aug 20, 2026
1022fef
revert(offlinedocs): restore Fumadocs default on-this-page TOC rail
nickvigilante Aug 20, 2026
526816a
docs(offlinedocs): document the stale-service-worker unclickable-UI g…
nickvigilante Aug 20, 2026
4252203
test(offlinedocs): lock in homepage title-less frontmatter stripping
nickvigilante Aug 20, 2026
756a998
perf(offlinedocs): convert supergraphic brand images to webp
nickvigilante Aug 20, 2026
19a498b
fix(offlinedocs): remove duplicate sidebar scrollbar
nickvigilante Aug 20, 2026
54a1d3b
refactor(offlinedocs): convert pure route builders to map/filter/reduce
nickvigilante Aug 20, 2026
9a532ca
docs(offlinedocs): move route-logic narrative to a README, trim comments
nickvigilante Aug 20, 2026
071be8e
docs(offlinedocs): trim transform.mjs comments to match routes.mjs
nickvigilante Aug 20, 2026
b837a0d
fix(offlinedocs): keep Reference last in the sidebar
nickvigilante Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,11 @@ jobs:
cd offlinedocs
pnpm lint

- name: Test
run: |
cd offlinedocs
pnpm test

- name: Build
# no `-j` flag as `make` fails with:
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
Expand Down
2 changes: 1 addition & 1 deletion docs/about/contributing/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ following third-party references:
## Tools

This repository runs [Vale](https://vale.sh/) on `docs/` as part of CI to enforce prose style.
The configuration is the repo-root `.vale.ini`, and the curated rule set is documented in [`docs/.style/style-guide/`](../../.style/style-guide/README.md).
The configuration is the repo-root `.vale.ini`, and the curated rule set is documented in [`docs/.style/style-guide/`](https://github.com/coder/coder/tree/main/docs/.style/style-guide).
Comment thread
nickvigilante marked this conversation as resolved.
Run the same checks locally with `make lint/prose`.
Vale runs in advisory mode in this iteration: warnings surface as inline PR annotations, but they don't block the build.

Expand Down
3 changes: 0 additions & 3 deletions offlinedocs/.eslintrc.json

This file was deleted.

15 changes: 12 additions & 3 deletions offlinedocs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@
# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# fumadocs-mdx generated index
/.source

# generated docs content (synced from ../docs by scripts/sync-docs.mjs);
# keep the directory itself so fumadocs-mdx has a source dir on a clean checkout
/content/docs/*
!/content/docs/.gitkeep

# doc images copied into the bundle by the sync step
/public/images/

# misc
.DS_Store
*.pem
Expand All @@ -31,6 +43,3 @@ pnpm-debug.log*

# typescript
*.tsbuildinfo

# content
public/images/
5 changes: 5 additions & 0 deletions offlinedocs/.prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
**/pnpm-lock.yaml
.next/
out/
.source/
content/docs/
public/images/
Empty file.
6 changes: 0 additions & 6 deletions offlinedocs/next-env.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions offlinedocs/next.config.js

This file was deleted.

53 changes: 53 additions & 0 deletions offlinedocs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Next.js configuration for the offlinedocs static export. It wires the Fumadocs
// MDX plugin into the build (createMDX/withMDX) and produces the
// coder_docs_<version>.tgz artifact the release pipeline ships for offline use.
// Each build setting is documented at its field below.

import { createMDX } from "fumadocs-mdx/next";
Comment thread
nickvigilante marked this conversation as resolved.

const withMDX = createMDX();

/** @type {import('next').NextConfig} */
const config = {
// Pin the workspace root to this folder. offlinedocs has its own
// package.json + lockfile inside the coder/coder repo, and Next would
// otherwise infer the repo root (which also has a lockfile) as the root.
turbopack: {
root: import.meta.dirname,
},
// Emit a fully static site into out/ so the docs bundle is self-contained
// and can be served by any static file host with no Node server. This is
// what the release pipeline tars into coder_docs_<version>.tgz for
// offline/airgapped use.
//
// Only export for production builds (`next build`). Under `output: export`
// Next installs an optional catch-all route that rejects any path
// generateStaticParams did not prerender. In dev that turns incidental
// requests into hard errors instead of clean 404s - most notably a stale
// /serviceWorker.js still registered at the dev origin by a prior site (a
// local coder server or the old offlinedocs, both of which used :3000),
// plus favicon probes and similar. When next dev errors on those, the page
// renders but never becomes interactive; the symptom reported in UAT was
// "nothing in the UI is clickable" (OS tabs, theme toggle, etc.). Gating
// export to production keeps next dev on Next's normal server (clean 404s),
// so local dev stays interactive, while next build still produces the full
// static export.
//
// Running the docs anywhere: if a machine shows a dead or unclickable page
// from an earlier session, a stale service worker is cached - unregister it
// (DevTools > Application > Service workers > Unregister) and hard-reload.
// The dev server also runs on :26337 (see the package.json scripts), not
// :3000, to stay off that shared origin.
Comment on lines +18 to +40

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.

yap yap yap yap yaaaaaap

output: process.env.NODE_ENV === "production" ? "export" : undefined,
// Canonical URLs end in a slash and every route is emitted as
// <route>/index.html, which is what a plain static file server expects.
trailingSlash: true,
// Doc images are copied into the bundle (refer to scripts/sync-docs.mjs)
// and served as-is; next/image optimization needs a running server,
// which a static export does not have.
images: {
unoptimized: true,
},
};

export default withMDX(config);
69 changes: 30 additions & 39 deletions offlinedocs/package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,51 @@
{
Comment thread
nickvigilante marked this conversation as resolved.
"name": "coder-docs-generator",
"private": true,
"description": "Generates the self-contained, offline Coder documentation bundle from the coder/coder docs corpus using Fumadocs.",
Comment thread
nickvigilante marked this conversation as resolved.
"scripts": {
"dev": "pnpm copy-images && next dev",
"sync": "node scripts/sync-docs.mjs",
"dev": "pnpm sync && next dev -p 26337",
"build": "next build",
"start": "next start",
"export": "pnpm copy-images && next build",
"copy-images": "sh ./scripts/copyImages.sh",
"export": "pnpm sync && next build",
"postinstall": "fumadocs-mdx",
"lint": "pnpm run lint:types",
"lint:types": "tsc --noEmit",
"format": "prettier --cache --write './**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'",
"format:check": "prettier --cache --check './**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'"
"lint:types": "pnpm sync && fumadocs-mdx && next typegen && node scripts/ensure-source.mjs && tsc --noEmit",
"format": "prettier --cache --write './**/*.{css,js,jsx,json,mjs,ts,tsx,yaml,yml}'",
"format:check": "prettier --cache --check './**/*.{css,js,jsx,json,mjs,ts,tsx,yaml,yml}'",
"test": "node --test 'scripts/**/*.test.mjs' && node --import tsx --test 'src/mdx-plugins/**/*.test.ts' && node --import tsx --import ./test/jsdom-setup.mjs --test 'src/components/**/*.test.tsx'"
},
"dependencies": {
"@chakra-ui/react": "2.10.10",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.1",
"archiver": "8.0.0",
"framer-motion": "^10.18.0",
"front-matter": "4.0.2",
"lodash": "4.18.1",
"next": "15.5.23",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-icons": "5.7.0",
"react-markdown": "10.1.0",
"rehype-raw": "7.0.0",
"remark-gfm": "4.0.1",
"sanitize-html": "2.17.6"
"@fontsource-variable/geist": "5.3.0",
"@fontsource-variable/geist-mono": "5.3.0",
"@phosphor-icons/react": "2.1.10",
"fumadocs-core": "16.10.5",
"fumadocs-mdx": "15.0.12",
"fumadocs-ui": "16.10.5",
"next": "16.2.9",
"react": "19.2.7",
"react-dom": "19.2.7",
"rehype-raw": "7.0.0"
},
"devDependencies": {
"@types/lodash": "4.17.25",
"@tailwindcss/postcss": "4.3.1",
"@types/mdx": "2.0.14",
"@types/node": "22.20.1",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@types/sanitize-html": "2.16.1",
"eslint": "8.57.1",
"eslint-config-next": "14.2.35",
"prettier": "3.9.6",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"jsdom": "25.0.1",
"postcss": "8.5.15",
"prettier": "3.9.4",
"tailwindcss": "4.3.1",
"tsx": "4.23.12",
"typescript": "6.0.3"
},
"engines": {
"npm": ">=9.0.0 <10.0.0",
"node": ">=22.0.0 <25.0.0"
},
"pnpm": {
"overrides": {
Comment thread
nickvigilante marked this conversation as resolved.
"@babel/runtime": "7.26.10",
"brace-expansion": "1.1.13",
"minimatch": "5.1.8",
"glob@>=10": "10.5.0",
"postcss": "8.5.10",
"js-yaml": "3.14.2",
"yaml": "1.10.3",
"flatted": "3.4.2",
"mdast-util-to-hast": "13.2.1"
"picomatch": "2.3.2",
"js-yaml": "4.1.1"
}
}
}
Loading
Loading