---
title: "Use Docusaurus or Sphinx to build the docs · Agent Wranglers"
url: https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/docs-site-generator
id: STK-109
level: Default
updated: 2026-10-27
build: a2a6bdfed830
tokens: 841
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Use Docusaurus or Sphinx to build the docs site

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: STK-109
- Level: Default
- Chapter: [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md)
- Rule: Build the docs site from Markdown in the repository with Docusaurus in a JavaScript project, or Sphinx in a Python project. Run its strict mode in CI.
- Check: The CI docs job runs `docusaurus build` with `onBrokenLinks: 'throw'`, or `sphinx-build -W`. A link to a missing page makes the job fail.
- Review by: 2027-01-10
- Cost: Open source. Docusaurus is MIT and Sphinx is BSD-2-Clause, both free to use.
- How: Both pass the five tests. Docusaurus 1.0.0 came out on 9 June 2017, and 3.10.2 on 10 July 2026. `@docusaurus/core` had about 1.3 million weekly npm downloads in the week to 1 July 2026. Its last release is from July 2026, so it fails the six-month test after 10 January 2027 unless a new one ships. Sphinx 1.0 came out on 23 July 2010, and 9.2.0 on 21 October 2026, with about 4.8 million weekly PyPI downloads. Sphinx also builds API reference pages from Python docstrings. Both fail on broken links in strict mode, as [Build the docs in CI and fail on every warning](https://agentwranglers.se/playbook/documentation/readme-and-docs-as-code/strict-docs-build.md) requires. MkDocs fails the release test, since its last release, 1.6.1, came out on 30 August 2024. Choose something else when the docs are a few pages. A folder of Markdown files on the code host is then enough.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
// docusaurus.config.js
export default {
  title: 'Harbour Bakery API',
  url: 'https://docs.example.com',
  baseUrl: '/',
  onBrokenLinks: 'throw',
  presets: [['classic', { docs: { routeBasePath: '/' } }]],
};
```

### Shell example

```sh
python -m sphinx -W --keep-going -b html docs docs/_build/html
```

## Related rules

- DOC-8 [Build and test the docs in CI and fail on every warning](https://agentwranglers.se/playbook/documentation/readme-and-docs-as-code/strict-docs-build.md) in Documentation

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/docs-site-generator">Agent Wranglers software choices playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Use GitHub Actions for continuous integration](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/github-actions-ci.md)
- Next: [Use Docker and Docker Compose for containers](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/docker-and-compose.md)
- [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md)
