Source for caprover.com, containing two independently built applications:
marketing-site/: Next.js marketing sitedocs-site/: Docusaurus 3 documentation sitecontent/: English source content and translations, grouped by localescripts/: composition and production smoke checks
The production build uses Docusaurus as the base, then overlays the marketing
site's index.html, _next/, and homepage-assets/ output.
Requires Node.js 22.13 or newer.
cd marketing-site
npm ci
npm run devRun checks:
npm run lint
npm run format:check
npm testThe documentation site requires Node.js 20 or newer. Use Node.js 22 to match the production workflow.
cd docs-site
npm ci
npm startAdd English Markdown files in content/en/docs/ and register them in
docs-site/sidebars.js. Docusaurus reads English directly from content/.
The documentation commands validate every locale and generate translated
Docusaurus build inputs before starting or building.
The next-generation English documentation is developed separately in
content/en/docs-next/, with its own docs-site/sidebars-next.js and routes
under /docs-next/. It is an unlinked preview. The preview pages are marked
noindex and omitted from the sitemap; existing /docs/ pages remain the
published documentation. Translated builds currently fall back to English for
the preview, while their existing /docs/ content stays translated.
The draft URL map tracks legacy routes and their planned
destinations. Topic pages marked as drafts remain incomplete until their content
phase is finished.
Docusaurus internationalization is configured by content/locales.json. English
is the source language. English documentation is served from /docs/*, and
translated documentation uses the locale prefix, such as /es-ES/docs/* or
/zh-CN/docs/*. Compatibility pages preserve the former
/docs/<locale>/*.html URLs.
Each locale is complete and self-contained under content/<locale>/:
docs/contains documentation Markdown.marketing.jsoncontains the flat Next.js marketing-site message catalog.docs-ui.jsoncontains Docusaurus navigation, sidebar, document-title, and interface strings.- Add a locale to
content/locales.jsonafter all three surfaces are complete.
Spanish and Simplified Chinese are enabled in content/locales.json. Their
documentation is published at /es-ES/docs/* and /zh-CN/docs/*, and the
Docusaurus language menu switches between the English, Spanish, and Chinese
versions of the current document.
On an unprefixed page view, the combined static site uses a saved language-menu choice or selects a supported locale from the browser's preferences. The URL always identifies the language of the page being viewed.
Follow the repository-wide authoring and translation rules in
content/README.md.
From the repository root:
(cd docs-site && npm ci && npm run clean-build)
(cd marketing-site && npm ci && npm run lint && npm run format:check && npm test)
node scripts/compose-site.mjs
node scripts/smoke-combined-site.mjsThe deployable artifact is written to build/combined-site/.
Pushes to master run .github/workflows/website-publish.yml, build both applications, compose and smoke-test the artifact, then publish it to GitHub Pages. Do not publish either framework's output directly.