Source for the Ultimate Multisite documentation site.
Built with Docusaurus and deployed automatically on push to main.
docs/- Documentation content (Markdown/MDX)docs/user-guide/- End-user documentationdocs/developer/- Developer docs, hooks reference, REST APIdocs/addons/- Addon-specific documentation
i18n/- Translated content (auto-generated)scripts/- Build and translation toolingsrc/- Custom Docusaurus components and pagesstatic/- Static assets (images, favicon)
npm install
npm start # Local dev server at localhost:3000
npm run build # Production buildDocumentation is translated using the Superdav AI Service through the existing OpenAI-compatible API path. The default cloud model is superdav-chat-pro; Ollama and other local-model options remain available through scripts/translate.js provider flags for local experiments.
Translations are generated via a GitHub Actions workflow:
# Trigger translation for all configured locales
gh workflow run translate.yml
# Translate specific languages
gh workflow run translate.yml -f languages=es,fr
# Force re-translation of all files
gh workflow run translate.yml -f force=trueBy default, the translator preserves existing files whose _i18n_hash matches the current English source. Missing, stale, or hash-less translations are regenerated; use force=true only when every translation should be replaced.
| Secret | Description |
|---|---|
OPENAI_API_KEY |
Docs-specific Superdav site token for translation. Store only in GitHub Secrets; never commit or print the token. |
| Variable or secret | Description |
|---|---|
OPENAI_API_BASE |
API base URL. Defaults to https://api.sdaiagent.com/v1; either the repository variable or secret can override it. |
OPENAI_MODEL |
Translation model. Defaults to superdav-chat-pro; either the repository variable or secret can override it. |
Use placeholders for local testing; do not paste real tokens into logs or commits:
OPENAI_API_BASE=https://api.sdaiagent.com/v1 \
OPENAI_API_KEY=<docs-site-token> \
OPENAI_MODEL=superdav-chat-pro \
node scripts/translate.js --locales es --files <docs-relative-file> --dry-runTo keep using local models, pass the local provider explicitly:
node scripts/translate.js --provider ollama-native --base-url http://localhost:11434 --model translategemma:27b --locales esPushes to main trigger the Deploy Documentation workflow, which builds the site and deploys via rsync.
src/theme/Root.js loads the deployed AI widget JavaScript and stylesheet with
their SHA-256 content hashes in the ver query parameter. Both assets have
long-lived immutable cache headers, so an unversioned URL can retain an older
widget even after the WordPress plugin is deployed.
After a widget deployment, obtain SHA-256 hashes of the deployed build files
embed-widget.js and style-embed-widget.css, update SCRIPT_VERSION and
STYLE_VERSION, and rebuild/deploy the docs across all locales. Do not use the
docs commit or a timestamp as a substitute for the widget's content version.
Verify that the published script URL includes the expected hash and its response bytes match that hash. On a fresh docs page, no public-chat configuration or session request should occur until the visitor opens the assistant. Route changes must reuse the existing widget rather than append another script/session.