| Crates.io | mdbook-diataxis |
| lib.rs | mdbook-diataxis |
| version | 0.1.1 |
| created_at | 2025-07-09 23:24:50.785336+00 |
| updated_at | 2025-07-09 23:38:20.199005+00 |
| description | A preprocessor for mdBook which helps apply the Diátaxis documentation framework |
| homepage | |
| repository | https://github.com/TheSignPainter98/mdbook-diataxis |
| max_upload_size | |
| id | 1745619 |
| size | 173,002 |
A preprocessor for mdBook which helps apply the Diátaxis documentation framework.
Type and run
cargo install mdbook-diataxis
This will build mdbook-diataxis from source.
mdbook-diataxisType and run the following command with the path to your book.
mdbook-diataxis install path/to/book
You will see that a new [preprocessor.diataxis] table has been added to your book.toml, the [output.html] table has been amended to include the newly-written diataxis.css file.
The Diátaxis directives are now available for use!
mdbook-diataxis defines the following directives.
{{#diataxis compass}}Expands to an html representation of the diátaxis compass.
Example:

The text of each part of the compass can be configured via book.toml.
{{#diataxis table-of-contents}}Expands to a table of contents listing the top-level children of the current chapter. Example:

The following is a configuration of mdbook-diataxis which modifies every available field.
This snippet is for demonstration purposes; all fields are optional.
[preprocessor.diataxis.compass.tutorials]
title = "new Tutorials title"
description = "new Tutorials description"
link = "path/to/tutorials.html"
[preprocessor.diataxis.compass.how-to-guides]
title = "new How-to guides title"
description = "new How-to guides description"
link = "path/to/how-to-guides.html"
[preprocessor.diataxis.compass.explanation]
title = "new Explanation title"
description = "new Explanation description"
link = "path/to/explanation.html"
[preprocessor.diataxis.compass.reference]
title = "new Reference title"
description = "new Reference description"
link = "path/to/reference.html"
This project is licensed under GPLv3.
This project was originally written by Ed Jones. Thank you jf908, for making the grid CSS.