The website and technical documentation for Open Pioneer Trails, built with Astro and Starlight.
.
├── public/ # Static assets, served as-is
├── src/
│ ├── assets/ # Images embedded in Markdown
│ ├── components/ # Astro components
│ ├── content/
│ │ └── docs/ # Page content
│ └── content.config.ts # Content collection definitions
├── astro.config.ts # Astro and Starlight configuration
├── oxfmt.config.ts # Formatter configuration
├── oxlint.config.ts # Linter configuration
├── package.json
└── tsconfig.json
Starlight renders every .md and .mdx file under src/content/docs/ as a page,
using the file path as the route. The sidebar is configured in astro.config.ts.
src/content/docs/trails-docs/ contains the user manual of the framework.
TODO:
- Create a global footer for the security policy, imprint, etc.
- Should we use
template: splashfor legal sites etc, or should they get a normal sidebar entry instead (and show the sidebar, too)?
Run all commands from the root of the project:
| Command | Action |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Start the development server at localhost:4321 |
pnpm build |
Build the production site to ./dist/ |
pnpm preview |
Preview the production build locally |
pnpm check-types |
Run typescript check (once) |
pnpm watch-types |
Run typescript check (continuously, in watch mode) |
pnpm lint |
Lint the sources (pnpm lint:fix applies automatic fixes) |
pnpm fmt |
Format the sources (pnpm fmt:check only reports) |
pnpm astro ... |
Run Astro CLI commands, for example astro check |
NOTE: TypeScript checks require a previous build or dev mode start (or an explicit astro sync), because they depend on generated files in the .astro directory.