Skip to content

Conversation

@sabine
Copy link
Contributor

@sabine sabine commented Oct 22, 2025

before after
Screenshot 2025-10-22 at 15-16-27 Getting Started and Core Concepts - Dune documentation Screenshot 2025-10-22 at 15-16-22 Overview - Dune documentation

Improve Documentation Structure and Navigation

This PR restructures the Dune documentation to make it more intuitive and easier to navigate, following better information architecture principles.

Changes

Documentation Reorganization:

  1. Renamed files for clarity:

    • usage.rstcommand-line-interface.rst - More descriptive title that clearly indicates the content
    • quick-start.rstpractical-examples.rst - Better reflects the actual content
    • Updated headers from "Quickstart" to "Practical Examples" and "Command-Line Interface" to "How to Use Dune's Command-Line Interface"
  2. Created new core-concepts directory:

    • Moved explanation/mental-model.rstcore-concepts/mental-model.rst
    • Moved explanation/scopes.rstcore-concepts/scopes.rst
    • Added new core-concepts/terminology.rst with comprehensive glossary of Dune terms (I have no idea why this was in overview.rst)
    • Added new core-concepts/index.rst as a landing page
    • Why I think this works: This captures the most important concepts and terms for beginners and wraps them up in their own section
  3. Flattened tutorial structure:

    • Moved tutorials/developing-with-dune/*first-steps-with-dune/* (8 files)
    • Moved tutorials/dune-package-management/*dune-package-management/* (5 files)
    • Why I believe this is useful: It makes it much easier to discover the "Getting Started" type of tutorials.
  4. Added URL redirects to preserve backlinks:

    • Added sphinx-reredirects dependency to handle URL redirects
    • Configured redirects in conf.py to maintain backward compatibility for all renamed/moved pages
    • Ensures existing links to old documentation paths continue to work
  5. Rearranged main table of contents to have a progression of content for newcomers

Motivation

The previous documentation structure had several issues:

  • Generic names like "Developing with Dune" and "Quickstart" didn't clearly give an idea of the content and intended audience (Quickstart is a collection of examples, that enable more experienced devs to learn by imitation)
  • The explanation/ directory was ambiguous in purpose (covering both basic ideas that beginners would benefit from understanding, as well as ideas that are more relevant to contributors to the Dune project)
  • The tutorials/ hierarchy added unnecessary nesting (which made it difficult to see the most important tutorials right away, requiring people to click into tutorials to get started)

Follow-Up Tasks

  • create more guides on Dune Package Management
    • "Using Dune Package Management in CI" (how to (e.g.) do caching in a GitHub Action the way we do with opam (cp the *.opam files into a container, then the source))
    • "Migrating from Opam to Dune Package Management"
    • "Distributing an Application with Dune Package Management"

@Alizter Alizter self-requested a review October 22, 2025 14:02
@Alizter
Copy link
Collaborator

Alizter commented Oct 22, 2025

One side-effect of flattening doc/tutorials is that this directory was marked as a data_only_dirs, meaning that dune would not look at dune or dune-project in that directory. Now that they have been flattened, dune is discovering those projects. We will need to mark them each separately as data_only_dirs if we are to proceed this way.

@sabine
Copy link
Contributor Author

sabine commented Oct 22, 2025

I also noticed that re-running make doc doesn't build everything affected when I make changes to the table of contents. Probably the sidebar dependency isn't listed accurately? Not even sure it's possible to do reliably do that, without having to maintain the list of files the sidebar is compiled from.

@maiste
Copy link
Collaborator

maiste commented Oct 22, 2025

I would advise against moving the tutorials to top level. One of the problems of the current dune documentation is that it is partially moved to a structure reflecting the diataxis framework. It is in a transient state where some pages have been reworked, but some are not...

Part of the doc are not clearly separated. Moving the tutorial top level increase this unclear separation of purposes and goes against the framework we were trying to follow to make the doc better (at least when it was improved by @ emillon)...

For the separation, I would say that "How to use Dune's Command Line Interface" should be rewritten and moved to tutorial. "First Step with Dune" should also go to tutorials/. "Package Management With Dune" should go back to tutorial.

My point is that if you want to know how to do things, the reflex is to go to tutorials. Of course, it should be linked from the first page to make it clear about the intention.


Also, the "FAQ" could be extracted from "Miscellaneous" to make it more visible (in general, the "Miscellaneous" top level should disappear).

The renaming makes it definitely clearer about the initiative 👌🏻

The fact that the overview is the first page when you arrive definitely makes it clearer 👍🏻

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.

3 participants