Monorepo for Tangled tangled.org

docs: add links for single & multipage views

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li de2ecad2 fb7071ad

verified
Changed files
+18 -1
docs
nix
pkgs
+3
docs/mode.html
··· 1 + <a class="px-4 py-2 mt-8 block text-center w-full rounded-sm shadow-sm border border-gray-200 dark:border-gray-700 no-underline hover:no-underline" href="$if(single-page)$/$else$/single-page.html$endif$"> 2 + $if(single-page)$View as multi-page$else$View as single-page$endif$ 3 + </a>
+2
docs/template.html
··· 74 74 $if(toc-title)$$toc-title$$else$Table of Contents$endif$ 75 75 </button> 76 76 ${ table-of-contents:toc.html() } 77 + ${ single-page:mode.html() } 77 78 </div> 78 79 79 80 ··· 83 84 <h2 id="$idprefix$toc-title" class="text-lg font-semibold mb-4 text-gray-900">$toc-title$</h2> 84 85 $endif$ 85 86 ${ table-of-contents:toc.html() } 87 + ${ single-page:mode.html() } 86 88 </nav> 87 89 $endif$ 88 90
+13 -1
nix/pkgs/docs.nix
··· 18 18 # icons 19 19 cp -rf ${lucide-src}/*.svg working/ 20 20 21 - # content 21 + # content - chunked 22 22 ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ 23 23 -o $out/ \ 24 24 -t chunkedhtml \ 25 25 --variable toc \ 26 + --variable-json single-page=false \ 26 27 --toc-depth=2 \ 27 28 --css=stylesheet.css \ 28 29 --chunk-template="%i.html" \ 30 + --highlight-style=working/highlight.theme \ 31 + --template=working/template.html 32 + 33 + # content - single page 34 + ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ 35 + -o $out/single-page.html \ 36 + --toc \ 37 + --variable toc \ 38 + --variable single-page \ 39 + --toc-depth=2 \ 40 + --css=stylesheet.css \ 29 41 --highlight-style=working/highlight.theme \ 30 42 --template=working/template.html 31 43