Skip to content

📝 docs: restructure following Diataxis framework#448

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:docs-fix-platforms-v2
Feb 16, 2026
Merged

📝 docs: restructure following Diataxis framework#448
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:docs-fix-platforms-v2

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

@gaborbernat gaborbernat commented Feb 16, 2026

The documentation mixed learning material, task recipes, background explanations, and API reference within the same files. A newcomer landing in usage.rst had to wade through platform conventions and production examples just to find how to call user_data_dir. Someone looking for a quick recipe had to skim past explanatory prose to reach the code. 📚 This made it harder than necessary to find the right information for the task at hand.

This restructures everything into the four quadrants of the Diataxis framework. A proper tutorial.rst walks new users through installation to a working example with verifiable output at each step. howto.rst is stripped to action-first recipes including new ones for config merging via iter_config_paths, mocking in tests, and environment variable overrides. All platform convention prose — macOS ~/Library behavior, Windows WIN_PD_OVERRIDE_* variables, XDG details, Android detection — is consolidated into explanation.rst instead of being scattered across three files. The reference pages (api.rst, platforms.rst) stay austere, with api.rst now surfacing the iter_* methods and the AppDirs backwards-compatibility alias.

This also adds docstrfmt as a pre-commit hook for consistent RST and docstring formatting, along with Sphinx extensions (sphinx-copybutton, sphinx-design, sphinxcontrib-mermaid, sphinxext-opengraph, sphinx-sitemap) that improve the rendered docs. The ruff config is adjusted to defer to docstrfmt for docstring style, and the release workflow script is fixed to produce docstrfmt-compatible changelog entries — it was missing a blank line after section underlines and generating overlines one character too short.

@gaborbernat gaborbernat requested a review from ofek as a code owner February 16, 2026 02:38
The documentation mixed tutorials, explanations, how-to recipes, and
reference material in the same files making it hard for users to find
what they need depending on context.

Reorganize into proper Diataxis quadrants:
- tutorial.rst: step-by-step learning guide for new users
- explanation.rst: platform conventions and design rationale
- howto.rst: task-oriented recipes without explanatory prose
- api.rst: iterator methods section and AppDirs alias
- platforms.rst: pure reference tables (moved prose to explanation)

Also add Sphinx extensions (sphinx-copybutton, sphinx-design,
sphinx-sitemap, sphinxcontrib-mermaid, sphinxext-opengraph), docstrfmt
pre-commit hook, and align ruff config with docstrfmt formatting.
@gaborbernat gaborbernat force-pushed the docs-fix-platforms-v2 branch from 9dbfde0 to 7b7a417 Compare February 16, 2026 02:41
@gaborbernat gaborbernat enabled auto-merge (squash) February 16, 2026 02:41
@gaborbernat gaborbernat merged commit 3e45fa9 into tox-dev:main Feb 16, 2026
29 checks passed
@ofek
Copy link
Copy Markdown
Collaborator

ofek commented Feb 16, 2026

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants