4 ms·
My dude, them's fighting words. So I built a SSG in 50 lines of mostly idiomatic Java (one line is a bit squished, but 52 just doesn't sound as cool): https://
by marginalia_nu 5y ago
My dude, them's fighting words. So I built a SSG in 50 lines of mostly idiomatic Java (one line is a bit squished, but 52 just doesn't sound as cool):
https://github.com/vlofgren/50-line-java-ssg https://github.com/vlofgren/50-line-java-ssg
Does deal with partials, bit stuff like an automatic index requires maybe 5-10 additional lines.
Took about an hour (plus 15 minutes to try to figure out how to get into my github account, which I haven't actively used in the last 15 odd years).
My "real" Java SSG is used to generate https://memex.marginalia.nu/ https://memex.marginalia.nu/. Unfortunately I don't have the source published.
- malkosta 5y agoI liked!
- malkosta 5y agoHere is the shortest I can get while keeping markdown support - 3 lines, with 1 dependency: for file in *.md; do pandoc --quiet --template layout.html $file -o "${file%.*}.html" done
- marginalia_nu 5y agoYou're wearing out your enter key my man $ find -maxdepth 0 -name \*md -exec sh -c 'pandoc --quiet --template layout.html "$0" -o ${0%.*}.html' {} \;
- malkosta 5y agoHahaha cool!