|
| 1 | +# Documentation Guide |
| 2 | + |
| 3 | +The project documentation lives in `docs/` and uses **Docusaurus 3** with pnpm. |
| 4 | + |
| 5 | +## Commands |
| 6 | + |
| 7 | +```bash |
| 8 | +cd docs |
| 9 | + |
| 10 | +# Install dependencies |
| 11 | +pnpm install |
| 12 | + |
| 13 | +# Local dev server with hot reload |
| 14 | +pnpm start |
| 15 | + |
| 16 | +# Production build |
| 17 | +pnpm build |
| 18 | +``` |
| 19 | + |
| 20 | +## Structure |
| 21 | + |
| 22 | +- `docs/docs/` — Current (next) version of docs, auto-generates sidebar from folder structure |
| 23 | + - `docs/docs/usage/` — "Using RestSharp" guides (basics, client, request, execute, response, example) |
| 24 | + - `docs/docs/advanced/` — Advanced topics (authenticators, configuration, serialization, interceptors, error handling) |
| 25 | + - `docs/docs/intro.md` — Getting started page |
| 26 | + - `docs/docs/changelog.md` — Release changelog |
| 27 | +- `docs/versioned_docs/` — Frozen snapshots for past versions (v110–v113) |
| 28 | +- `docs/versioned_sidebars/` — Sidebar configs for each frozen version |
| 29 | +- `docs/versions.json` — List of released doc versions |
| 30 | +- `docs/src/pages/` — Standalone pages (migration guide, support) |
| 31 | +- `docs/docusaurus.config.ts` — Site config (URL, navbar, footer, plugins, versioning) |
| 32 | +- `docs/sidebars.ts` — Sidebar config (autogenerated from directory structure) |
| 33 | + |
| 34 | +## Versioning |
| 35 | + |
| 36 | +Docs use Docusaurus versioned docs. `docs/docs/` is the "next" (unreleased) version. To cut a new version: `pnpm docusaurus docs:version vXXX`. This copies `docs/docs/` into `versioned_docs/version-vXXX/` and creates a matching sidebar file. Update `docusaurus.config.ts` to add the new version label. |
| 37 | + |
| 38 | +## Writing Docs |
| 39 | + |
| 40 | +- Markdown files with optional frontmatter (`sidebar_position`, `title`, `sidebar_label`) |
| 41 | +- Category ordering via `_category_.json` files in each directory |
| 42 | +- Code blocks use `csharp` language identifier for syntax highlighting |
| 43 | +- Edit current docs in `docs/docs/`; do not modify `versioned_docs/` unless backporting fixes |
0 commit comments