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