mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-16 04:04:34 +02:00
docs: Introduce an user guide (#1121)
This commit is contained in:
parent
d656834e3d
commit
ad8aa72490
6 changed files with 117 additions and 6 deletions
|
@ -5,7 +5,7 @@
|
|||
nixos-render-docs,
|
||||
pandoc,
|
||||
}: let
|
||||
capitalizeHeaders = ''
|
||||
manualFilter = ''
|
||||
local text = pandoc.text
|
||||
|
||||
function Header(el)
|
||||
|
@ -17,17 +17,24 @@
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
function Link(el)
|
||||
return el.content
|
||||
end
|
||||
'';
|
||||
|
||||
manHeader =
|
||||
manHeader = let
|
||||
mkMDSection = file: "<(pandoc --lua-filter <(echo \"$manualFilter\") -f gfm -t man ${file})";
|
||||
in
|
||||
runCommand "nixvim-general-doc-manpage" {
|
||||
nativeBuildInputs = [pandoc];
|
||||
inherit capitalizeHeaders;
|
||||
inherit manualFilter;
|
||||
} ''
|
||||
mkdir -p $out
|
||||
cat \
|
||||
${./nixvim-header-start.5} \
|
||||
<(pandoc --lua-filter <(echo "$capitalizeHeaders") -f gfm -t man ${../helpers.md}) \
|
||||
${mkMDSection ../user-guide/helpers.md} \
|
||||
${mkMDSection ../user-guide/faq.md} \
|
||||
${./nixvim-header-end.5} \
|
||||
>$out/nixvim-header.5
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue