From ee404a058edac0508649bf53aac2cae89bb757a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sun, 18 Feb 2024 16:06:32 +0100 Subject: [PATCH] feat(docs): Generate github source urls --- docs/default.nix | 12 +++++++++--- docs/src/configuration-overview.md | 3 +++ docs/src/home-options.md | 2 ++ docs/src/nixos-options.md | 2 ++ docs/src/nvim-options.md | 2 ++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index d06f5b0..89f6c9d 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -23,10 +23,16 @@ in mkdir -p ./theme ln -s ${highlight} ./theme/highlight.js + cat > sed-cmds <

+ s/^## /### / + EOF # copy generated options removing the declared by statement - sed '/^\*Declared by:\*$/,/^$/d' <${home-markdown} >> ./src/home-options.md - sed '/^\*Declared by:\*$/,/^$/d' <${nvim-markdown} >> ./src/nvim-options.md - sed '/^\*Declared by:\*$/,/^$/d' <${nixos-markdown} >> ./src/nixos-options.md + sed -f sed-cmds <${home-markdown} >> ./src/home-options.md + sed -f sed-cmds <${nvim-markdown} >> ./src/nvim-options.md + sed -f sed-cmds <${nixos-markdown} >> ./src/nixos-options.md ''; nativeBuildInputs = [ pkgs.mdbook-toc ]; diff --git a/docs/src/configuration-overview.md b/docs/src/configuration-overview.md index c9af0a5..932f63a 100644 --- a/docs/src/configuration-overview.md +++ b/docs/src/configuration-overview.md @@ -5,6 +5,9 @@ I use [NixOS](https://nixos.org) and system and user configuration respectively. You can see what options I have added to configure the system and user configuration in the next chapters. +The source repo is +[configuration.nix](https://github.com/jalil-salame/configuration.nix). + ## Table of Contents diff --git a/docs/src/home-options.md b/docs/src/home-options.md index 14d97f2..45e50fb 100644 --- a/docs/src/home-options.md +++ b/docs/src/home-options.md @@ -11,3 +11,5 @@ search](https://mipmip.github.io/home-manager-option-search/) ## Table of Contents + +## Options diff --git a/docs/src/nixos-options.md b/docs/src/nixos-options.md index 7bca7a5..0b4e5a1 100644 --- a/docs/src/nixos-options.md +++ b/docs/src/nixos-options.md @@ -10,3 +10,5 @@ through [NixOS Options](https://search.nixos.org/options). ## Table of Contents + +## Options diff --git a/docs/src/nvim-options.md b/docs/src/nvim-options.md index 828d8dc..3fe61c7 100644 --- a/docs/src/nvim-options.md +++ b/docs/src/nvim-options.md @@ -11,3 +11,5 @@ search](https://nixneovim.github.io/nixneovim-option-search/). ## Table of Contents + +## Options