feat(docs): Preprocess with mdbook-toc

This commit is contained in:
Jalil David Salamé Messina 2024-02-01 21:57:23 +01:00 committed by Jalil David Salamé Messina
parent a09d3cd21a
commit 43a683dcc2
5 changed files with 11 additions and 0 deletions

View file

@ -4,3 +4,7 @@ language = "en"
multilingual = false multilingual = false
src = "src" src = "src"
title = "Jalil's NixOS configuration module" title = "Jalil's NixOS configuration module"
[preprocessor.toc]
command = "mdbook-toc"
renderer = ["html"]

View file

@ -35,6 +35,7 @@ in
sed '/^\*Declared by:\*$/,/^$/d' <${nixos-markdown} >> src/nixos-options.md sed '/^\*Declared by:\*$/,/^$/d' <${nixos-markdown} >> src/nixos-options.md
''; '';
nativeBuildInputs = [ pkgs.mdbook-toc ];
buildPhase = "${pkgs.mdbook}/bin/mdbook build --dest-dir $out"; buildPhase = "${pkgs.mdbook}/bin/mdbook build --dest-dir $out";
}; };
} }

View file

@ -5,6 +5,8 @@ I use [NixOS](https://nixos.org) and
system and user configuration respectively. You can see what options I have system and user configuration respectively. You can see what options I have
added to configure the system and user configuration in the next chapters. added to configure the system and user configuration in the next chapters.
## Table of Contents
<!-- toc --> <!-- toc -->
## How to Use ## How to Use

View file

@ -8,4 +8,6 @@ Manual](https://nix-community.github.io/home-manager/) or search the available
options through [home-manager option options through [home-manager option
search](https://mipmip.github.io/home-manager-option-search/) search](https://mipmip.github.io/home-manager-option-search/)
## Table of Contents
<!-- toc --> <!-- toc -->

View file

@ -7,4 +7,6 @@ You might want to take a look at the [NixOS
Manual](https://nixos.org/manual/nixos/stable/) or search the available options Manual](https://nixos.org/manual/nixos/stable/) or search the available options
through [NixOS Options](https://search.nixos.org/options). through [NixOS Options](https://search.nixos.org/options).
## Table of Contents
<!-- toc --> <!-- toc -->