feat(docs): Generate github source urls
This commit is contained in:
parent
00e193c0d4
commit
ee404a058e
5 changed files with 18 additions and 3 deletions
|
@ -23,10 +23,16 @@ in
|
||||||
mkdir -p ./theme
|
mkdir -p ./theme
|
||||||
ln -s ${highlight} ./theme/highlight.js
|
ln -s ${highlight} ./theme/highlight.js
|
||||||
|
|
||||||
|
cat > sed-cmds <<EOF
|
||||||
|
# Replace nix store path to github url
|
||||||
|
s:\[/nix/store/[^\\]*-source/\(.*\)\\.nix\](.*):[\1\\.nix](https\://github.com/jalil-salame/configuration.nix/blob/main/\1.nix):
|
||||||
|
# Make <h2> <h3>
|
||||||
|
s/^## /### /
|
||||||
|
EOF
|
||||||
# copy generated options removing the declared by statement
|
# copy generated options removing the declared by statement
|
||||||
sed '/^\*Declared by:\*$/,/^$/d' <${home-markdown} >> ./src/home-options.md
|
sed -f sed-cmds <${home-markdown} >> ./src/home-options.md
|
||||||
sed '/^\*Declared by:\*$/,/^$/d' <${nvim-markdown} >> ./src/nvim-options.md
|
sed -f sed-cmds <${nvim-markdown} >> ./src/nvim-options.md
|
||||||
sed '/^\*Declared by:\*$/,/^$/d' <${nixos-markdown} >> ./src/nixos-options.md
|
sed -f sed-cmds <${nixos-markdown} >> ./src/nixos-options.md
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.mdbook-toc ];
|
nativeBuildInputs = [ pkgs.mdbook-toc ];
|
||||||
|
|
|
@ -5,6 +5,9 @@ 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.
|
||||||
|
|
||||||
|
The source repo is
|
||||||
|
[configuration.nix](https://github.com/jalil-salame/configuration.nix).
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
|
@ -11,3 +11,5 @@ search](https://mipmip.github.io/home-manager-option-search/)
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
|
@ -10,3 +10,5 @@ through [NixOS Options](https://search.nixos.org/options).
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
|
@ -11,3 +11,5 @@ search](https://nixneovim.github.io/nixneovim-option-search/).
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
Loading…
Reference in a new issue