From de2ecad25faf173ab536ae65278665dc17eeb5fb Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 05 Jan 2026 15:36:20 +0000 Subject: [PATCH] docs: add links for single & multipage views Signed-off-by: oppiliappan --- docs/mode.html | 3 +++ docs/template.html | 2 ++ nix/pkgs/docs.nix | 14 +++++++++++++- 3 file(s) changed, 18 insertion(s)(+), 1 deletion(s)(-) diff --git a/docs/mode.html b/docs/mode.html new file mode 100644 --- /dev/null +++ b/docs/mode.html @@ -0,0 +1,3 @@ + + $if(single-page)$View as multi-page$else$View as single-page$endif$ + diff --git a/docs/template.html b/docs/template.html --- a/docs/template.html +++ b/docs/template.html @@ -74,6 +74,7 @@ ${ x.svg() } $if(toc-title)$$toc-title$$else$Table of Contents$endif$ ${ table-of-contents:toc.html() } + ${ single-page:mode.html() } @@ -83,6 +84,7 @@ $if(toc-title)$

$toc-title$

$endif$ ${ table-of-contents:toc.html() } + ${ single-page:mode.html() } $endif$ diff --git a/nix/pkgs/docs.nix b/nix/pkgs/docs.nix --- a/nix/pkgs/docs.nix +++ b/nix/pkgs/docs.nix @@ -18,14 +18,26 @@ # icons cp -rf ${lucide-src}/*.svg working/ - # content + # content - chunked ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ -o $out/ \ -t chunkedhtml \ --variable toc \ + --variable-json single-page=false \ --toc-depth=2 \ --css=stylesheet.css \ --chunk-template="%i.html" \ + --highlight-style=working/highlight.theme \ + --template=working/template.html + + # content - single page + ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ + -o $out/single-page.html \ + --toc \ + --variable toc \ + --variable single-page \ + --toc-depth=2 \ + --css=stylesheet.css \ --highlight-style=working/highlight.theme \ --template=working/template.html -- tangled.sh