This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / nix / pkgs / docs.nix
2.2 kB 76 lines
1{ 2 pandoc, 3 pagefind, 4 tailwindcss, 5 tailwindcss-animated-src, 6 linkFarm, 7 runCommandLocal, 8 inter-fonts-src, 9 ibm-plex-mono-src, 10 lucide-src, 11 dolly, 12 src, 13}: let 14 tailwindcss-plugins = linkFarm "tailwindcss-plugins" [ 15 { 16 name = "tailwindcss-animated"; 17 path = tailwindcss-animated-src; 18 } 19 ]; 20in 21 runCommandLocal "docs" {} '' 22 mkdir -p working 23 24 # copy templates, themes, styles, filters to working directory 25 cp ${src}/docs/*.html working/ 26 cp ${src}/docs/*.theme working/ 27 cp ${src}/docs/*.css working/ 28 29 # icons 30 cp -rf ${lucide-src}/*.svg working/ 31 32 # logo 33 ${dolly}/bin/dolly -output working/dolly.svg -color currentColor 34 35 # content - chunked 36 ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ 37 -o $out/ \ 38 -t chunkedhtml \ 39 --variable toc \ 40 --variable-json single-page=false \ 41 --toc-depth=2 \ 42 --css=stylesheet.css \ 43 --chunk-template="%i.html" \ 44 --highlight-style=working/highlight.theme \ 45 --template=working/template.html 46 47 # content - single page 48 ${pandoc}/bin/pandoc ${src}/docs/DOCS.md \ 49 -o $out/single-page.html \ 50 --toc \ 51 --variable toc \ 52 --variable single-page \ 53 --toc-depth=2 \ 54 --css=stylesheet.css \ 55 --highlight-style=working/highlight.theme \ 56 --template=working/template.html 57 58 # fonts 59 mkdir -p $out/static/fonts 60 cp -f ${inter-fonts-src}/web/InterVariable*.woff2 $out/static/fonts/ 61 cp -f ${inter-fonts-src}/web/InterDisplay*.woff2 $out/static/fonts/ 62 cp -f ${inter-fonts-src}/InterVariable*.ttf $out/static/fonts/ 63 cp -f ${ibm-plex-mono-src}/fonts/complete/woff2/IBMPlexMono*.woff2 $out/static/fonts/ 64 65 # favicons 66 ${dolly}/bin/dolly -output $out/static/logos/dolly.png -size 180 67 ${dolly}/bin/dolly -output $out/static/logos/dolly.ico -size 48 68 ${dolly}/bin/dolly -output $out/static/logos/dolly.svg -color currentColor -favicon 69 70 # styles 71 export NODE_PATH=${tailwindcss-plugins} 72 cd ${src} && ${tailwindcss}/bin/tailwindcss -i input.css -o $out/stylesheet.css 73 74 # search index 75 ${pagefind}/bin/pagefind --site $out --output-path $out/pagefind 76 ''