Skip to content

OWOX Docs

This is the source code for the monorepo documentation site based on the Astro + Starlight project.

Inside the OWOX Docs project (apps/docs from the monorepo root), you’ll find the following folders and files:

Terminal window
.
β”œβ”€β”€ public/
β”œβ”€β”€ scripts/
β”‚ β”œβ”€β”€ env-config.js # Environment configuration script
β”‚ β”œβ”€β”€ sync-docs.js # Content and assets synchronization script
β”‚ └── utils.js # Utils functions script
β”œβ”€β”€ src/
β”‚ └── content.config.ts # Starlight content configuration
β”œβ”€β”€ astro.config.mjs
β”œβ”€β”€ package.json
└── tsconfig.json

Unlike a standard Starlight project, all documentation content is dynamically synced from the entire monorepo. The content is copied to the src/content/docs/ directory, and images are copied to src/assets/ during the development and build processes. You can also manually trigger the content update process by running the sync command.

The Starlight framework then looks for .md or .mdx files in the content directory. Each file is exposed as a route based on its file name.

Images are located in src/assets/ and can be embedded in Markdown using a relative link.

Static assets, such as favicons, can be placed in the public/ directory. These are not dynamically synced.

The scripts/ directory contains scripts for synchronizing documentation content and configuring the environment.

ℹ️ For information about required environment variables for production, see ⚠️ Environment Variables.

You can run commands from different directories in the monorepo.

These commands are run from the monorepo root in a terminal:

CommandAction
npm installInstalls all monorepo dependencies
npm run dev:docsStarts the local dev server at localhost:4321
npm run build:docsBuilds your production site to ./apps/docs/dist/

These commands are run from the project root in a terminal:

CommandAction
npm installInstalls project dependencies
npm run syncCopies content (.md files) and images to ./src/
npm run devStarts the local dev server at localhost:4321
npm run buildBuilds your production site to ./dist/
npm run previewPreviews your build locally before deploying
npm run astro ...Runs CLI commands like astro add, astro check
npm run astro -- --helpGets help using the Astro CLI

Before deploying to production, make sure to set all required environment variables.
These variables are processed by the env-config.mjs script.