Skip to content

docs: reorganise documentation using the Diátaxis model#357

Merged
agriyakhetarpal merged 6 commits into
mainfrom
copilot/reorganise-documentation-diataxis
Jun 3, 2026
Merged

docs: reorganise documentation using the Diátaxis model#357
agriyakhetarpal merged 6 commits into
mainfrom
copilot/reorganise-documentation-diataxis

Conversation

Copilot AI commented May 27, 2026

Copy link
Copy Markdown
Contributor

The documentation had a getting-started/ section that didn't map to any Diátaxis quadrant, with conceptual background, tutorials, and task guides mixed together. This restructures the docs into the four strict Diátaxis quadrants — not only by relocating files, but also by moving content sections within files to their correct quadrant.

Changes

Files relocated

Old New Diátaxis quadrant
getting-started/quickstart.md tutorials/quickstart.md Tutorial
getting-started/installation.md tutorials/installation.md Tutorial
getting-started/concepts.md explanation/concepts.md Explanation
getting-started/testing.md how-to/testing.md How-to guide

getting-started/ is removed entirely — the first tutorial is the getting-started experience.

explanation/architecture.md (previously filed under the Reference toctree) is moved into its own Explanation section.

index.md toctree restructured

Four top-level captions now map 1:1 to Diátaxis quadrants: Tutorials, How-to Guides, Reference, Explanation. The landing-page card links and all internal cross-links across the docs are updated accordingly.

Content reorganised within files

  • tutorials/c-extension.md: Removed three non-tutorial sections that were embedded in the tutorial:

    • What happens under the hood (explanation of filtered flags and EMCC_DEBUG) — covered by explanation/architecture.md and how-to/debugging.md
    • Export modes (reference table of --exports values) — moved to reference/cli.md
    • Common build issues (troubleshooting guide) — duplicated content already in how-to/debugging.md
    • What's next? updated with links to the relevant quadrant pages
  • reference/cli.md: Added ### Export modes subsection under ## pyodide build, documenting pyinit, requested, and whole_archive modes and named-symbol export syntax.

  • reference/configuration.md: Added ## Flags automatically filtered section with the full table of Emscripten-incompatible flags, moved from the how-to guide where it was reference content.

  • how-to/compiler-flags.md: Replaced the duplicate filtered-flags reference table with a one-sentence summary and a link to reference/configuration.md.

  • explanation/concepts.md: Trimmed the ## Platform tags section — removed the tag format string, wheel-filename ASCII diagram, and legacy-tag note that were already present verbatim in reference/platform.md; kept the conceptual introduction and added a link to the Platform Reference.

- Move getting-started/quickstart.md → tutorials/quickstart.md
- Move getting-started/installation.md → tutorials/installation.md
- Move getting-started/concepts.md → explanation/concepts.md
- Move getting-started/testing.md → how-to/testing.md
- Remove now-empty getting-started/ directory
- Update all internal cross-links in moved and referencing files
- Restructure index.md toctree into four Diátaxis quadrants:
  Tutorials / How-to Guides / Reference / Explanation
Copilot AI changed the title [WIP] Organise documentation using Diátaxis model docs: reorganise documentation using the Diátaxis model May 27, 2026
Copilot AI requested a review from agriyakhetarpal May 27, 2026 14:28
@agriyakhetarpal

Copy link
Copy Markdown
Member

@copilot this restructuring was about the files, so it works. Can you carefully read all the Markdown files and explore their entire contents? It would be nice if we could make a coherent picture of which information goes where, instead of just renaming files, as the structure and layout of the content is important to understand where and how sections should be named, renamed, moved, and reorganised.

- tutorials/c-extension.md: remove three non-tutorial sections
  (What happens under the hood, Export modes, Common build issues) and
  update What's next links to point to architecture.md, debugging.md
  and reference/cli.md

- reference/cli.md: add Export modes table under pyodide build,
  documenting pyinit / requested / whole_archive modes and named-symbol
  export syntax (moved from c-extension.md)

- reference/configuration.md: add Flags automatically filtered section
  with the full table of Emscripten-incompatible flags (moved from
  how-to/compiler-flags.md); add explicit MyST label for cross-linking

- how-to/compiler-flags.md: replace the duplicate filtered-flags table
  with a one-sentence summary and a link to reference/configuration.md

- explanation/concepts.md: trim Platform tags section — remove the
  duplicated format string, wheel-filename ASCII diagram, and legacy-tag
  note (all already present verbatim in reference/platform.md); keep the
  conceptual intro and add a link to the Platform Reference

Copilot AI commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

@copilot this restructuring was about the files, so it works. Can you carefully read all the Markdown files and explore their entire contents? It would be nice if we could make a coh...

Done — the latest commit goes beyond file renames to reorganise content within files according to Diátaxis quadrant rules:

tutorials/c-extension.md — three non-tutorial sections removed:

  • What happens under the hood (explanation of filtered flags + EMCC_DEBUG) — now lives in explanation/architecture.md and how-to/debugging.md
  • Export modes (reference table of --exports values) — moved to reference/cli.md under a new ### Export modes subsection
  • Common build issues (troubleshooting guide) — already covered in how-to/debugging.md; removed the duplication
  • What's next? updated with links to architecture.md, debugging.md, and the new CLI export-modes reference

reference/cli.md — added the ### Export modes table (pyinit / requested / whole_archive) and the named-symbol export syntax under ## pyodide build

reference/configuration.md — added ## Flags automatically filtered section with the full table of Emscripten-incompatible flags (previously scattered in the how-to guide)

how-to/compiler-flags.md — replaced the duplicate filtered-flags table with a one-sentence summary and a link to reference/configuration.md

explanation/concepts.md — trimmed the ## Platform tags section: removed the format string, wheel-filename ASCII diagram, and legacy-tag note (all already present verbatim in reference/platform.md); kept the conceptual intro + link to the Platform Reference

Sphinx build passes with only the two expected network-timeout intersphinx warnings.

@agriyakhetarpal agriyakhetarpal marked this pull request as ready for review May 27, 2026 15:00
@agriyakhetarpal

Copy link
Copy Markdown
Member

Hi @ryanking13, I'm curious to know what you think of this start by Copilot towards Diátaxis. As for me: I like the overall direction here, and I think there can be further changes that we can steer Copilot into doing.

@ryanking13

Copy link
Copy Markdown
Member

@agriyakhetarpal Thanks for working on this. I don't know well about the Diátaxis model so I need some time to learn and consume it, but I like the idea of having a good documentation model. Feel free to go ahead and make more changes or merge if you want. We can update documentation anytime so you don't need to be blocked by me.

@ryanking13 ryanking13 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quickly skimmed through the docs and it looks okay to me. We can probably improve what should be in tutorials and what should be in how-to guides, but this looks like a good starter.

@agriyakhetarpal

Copy link
Copy Markdown
Member

@copilot do one final review of this after I merged main just now and check

After the merge of #355 (which auto-generates CLI docs via sphinx-click),
the manually-written Export modes section in reference/cli.md was lost.

- Add an `## Export modes` section to docs/reference/cli.md with the
  reference table for `pyinit`, `requested`, and `whole_archive` modes,
  plus a note on comma-separated symbol lists. A MyST label
  `(export-modes)=` is added so the section can be linked by anchor.
- Update the `--exports` Click help text in cli/build.py to concisely
  describe all four input forms; this text also appears in the
  auto-generated sphinx-click block.
- Update the link in tutorials/c-extension.md to use the
  `#export-modes` anchor so it lands directly on the new section.

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot do one final review of this after I merged main just now and check

Done. After the merge of main (#355, which switched reference/cli.md to sphinx-click auto-generation), the manually-written Export modes table was lost and the c-extension.md link was pointing to a section that no longer existed.

Fixed in commit 4e069c6:

  • Re-added ## Export modes to docs/reference/cli.md (after the auto-generated block), with a MyST anchor (export-modes)= for direct linking
  • Updated the --exports Click help text in pyodide_build/cli/build.py to describe all four input forms — this now also surfaces in the sphinx-click–generated section
  • Updated the link in tutorials/c-extension.md to use ../reference/cli.md#export-modes so it lands on the correct section

All other cross-references in the docs checked out fine.

@agriyakhetarpal

Copy link
Copy Markdown
Member

@copilot RTD build failing: /home/docs/checkouts/readthedocs.org/user_builds/pyodide-build/checkouts/357/docs/tutorials/c-extension.md:122: WARNING: local id not found in doc 'reference/cli': 'export-modes' [myst.xref_missing]

MyST reports `local id not found in doc 'reference/cli': 'export-modes'`
because the (export-modes)= label sits after the {eval-rst} block and
isn't resolved as a local id. No other links in the docs use #fragment
anchors — remove the #export-modes fragment to match the pattern used
everywhere else and silence the warning.

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot RTD build failing: /home/docs/checkouts/readthedocs.org/user_builds/pyodide-build/checkouts/357/docs/tutorials/c-extension.md:122: WARNING: local id not found in doc 'refere...

Fixed in the latest commit — removed the #export-modes fragment from the link. MyST can't resolve that local id because the (export-modes)= label sits after the {eval-rst} block (sphinx-click expansion interferes with label resolution). No other links in the docs use #fragment anchors, so the fix aligns with the pattern used everywhere else.

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing @ryanking13!

@agriyakhetarpal agriyakhetarpal merged commit a84d674 into main Jun 3, 2026
12 checks passed
@agriyakhetarpal agriyakhetarpal deleted the copilot/reorganise-documentation-diataxis branch June 3, 2026 08:34
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.

Reorganise documentation using Diátaxis model

3 participants