Sync Generated Docs Bundle
Package generated documentation into the backend bundle used by the public Docs pages and the authenticated app Documentation screen. The sync writes articles.json and manifest.json, and can rebuild the runtime documentation media directory when DOCS_ASSETS_OUTPUT is set.
In this article
Use this guide when release or documentation operators need the same generated guide corpus to appear on the public landing Docs pages and inside the authenticated Antylogic app.
The sync packages an existing generated bundle. It does not create, approve, edit, or publish individual articles.
For the GB documentation target, validate with English Docs requests after rerunning the sync from the latest generated source.
Before you start
- Shell or CI access to a checkout that contains backend/scripts/sync-docs-content.mjs.
- Node.js is available for node backend/scripts/sync-docs-content.mjs.
- A supported source exists through DOCS_GENERATED_SOURCE, DOCS_SOURCE_DIR, or the default frontend/landingpage/src/content/wiki-generated-data.ts.
- The process can write to DOCS_CONTENT_OUTPUT or the default backend/docs-content directory.
- If DOCS_ASSETS_OUTPUT is set, it points to a safe directory that can be deleted and recreated.
- For backend/scripts/prepare-docs-content.sh with a remote docs ref, git and the configured docs repository credentials are available.
- No Antylogic in-app role or permission is required because this is a shell or CI operation.
Instructions
- 1.
Select the source
Choose the generated documentation bundle to package. Use DOCS_GENERATED_SOURCE for one explicit file, DOCS_SOURCE_DIR for a generated docs checkout or build directory, or leave both unset to use frontend/landingpage/src/content/wiki-generated-data.ts.
- 2.
Run the sync
Run node backend/scripts/sync-docs-content.mjs for a direct local package, or backend/scripts/prepare-docs-content.sh [environment] when deployment preparation should resolve a docs ref first.
- 3.
Review the bundle
Check articles.json and manifest.json before release packaging. Confirm version, generated_at, locales, platforms, source metadata, and the articles_file pointer.
- 4.
Handle media assets
Set DOCS_ASSETS_OUTPUT only when documentation screenshots or clips must be packaged. The sync resets that directory and copies the resolved docs asset source when one exists; without it, only content files are written.
- 5.
Verify public Docs
Open /docs, /manual, or /wiki and confirm the page loads from the backend bundle. Check GET /api/public/docs?locale=en&platform=web&theme=light for article_count and sections.
- 6.
Verify app Docs
Use the Harbor Demo Group GB session for Harbor Demo User. Check GET /api/app/docs?locale=en&platform=web&theme=light, then open antylogic://docs and confirm the Documentation screen loads the same index.
Validations and limits
- The command finishes without a source-not-found or parse error.
- articles.json and manifest.json exist under the selected content output root.
- manifest.json contains articles_file: articles.json.
- locales includes the expected documentation languages; the checked-in bundle currently contains en and es.
- platforms is mobile, tablet, and web.
- Public and authenticated docs index responses expose article_count and sections after sync.
- Documentation media, when present, resolves through /api/public/docs/assets/... or /api/app/docs/assets/....
- Treat the checked-in bundle as potentially older than the latest documentation update until the sync is rerun from the newer generated source.
Expected result
After verification, both public and authenticated Docs surfaces read the same backend documentation bundle, and runtime assets are either copied into the configured output directory or intentionally left out.