docs: reorganise documentation using the Diátaxis model#357
Conversation
- 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 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
Done — the latest commit goes beyond file renames to reorganise content within files according to Diátaxis quadrant rules:
Sphinx build passes with only the two expected network-timeout intersphinx warnings. |
|
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. |
|
@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
left a comment
There was a problem hiding this comment.
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.
|
@copilot do one final review of this after I merged |
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.
Done. After the merge of Fixed in commit
All other cross-references in the docs checked out fine. |
|
@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.
Fixed in the latest commit — removed the |
agriyakhetarpal
left a comment
There was a problem hiding this comment.
Thanks for reviewing @ryanking13!
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
getting-started/quickstart.mdtutorials/quickstart.mdgetting-started/installation.mdtutorials/installation.mdgetting-started/concepts.mdexplanation/concepts.mdgetting-started/testing.mdhow-to/testing.mdgetting-started/is removed entirely — the first tutorial is the getting-started experience.explanation/architecture.md(previously filed under theReferencetoctree) is moved into its ownExplanationsection.index.mdtoctree restructuredFour 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:EMCC_DEBUG) — covered byexplanation/architecture.mdandhow-to/debugging.md--exportsvalues) — moved toreference/cli.mdhow-to/debugging.mdreference/cli.md: Added### Export modessubsection under## pyodide build, documentingpyinit,requested, andwhole_archivemodes and named-symbol export syntax.reference/configuration.md: Added## Flags automatically filteredsection 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 toreference/configuration.md.explanation/concepts.md: Trimmed the## Platform tagssection — removed the tag format string, wheel-filename ASCII diagram, and legacy-tag note that were already present verbatim inreference/platform.md; kept the conceptual introduction and added a link to the Platform Reference.