====== Minimal Static Site Generators ====== The suckless-adjacent landscape: for when you want more than [[indieweb:bashblog|bashblog]] but less than Hugo or Eleventy. ===== ssg ===== The classic tilde pick, popularized through low-tech and tilde circles: ~150 lines of POSIX sh by Roman Zolotarev. Markdown in, HTML out, plus a sitemap and RSS. Pairs with ''lowdown'' for markdown. git clone https://github.com/roman-zolotarev/ssg ./ssg5 src dst "Site Title" "https://tilde.town/~you" You write your own ''_header.html'' and ''_footer.html'' partials and a stylesheet. ===== saait ===== Single C binary, ~575 lines, no runtime deps: [[https://codemadness.org/saait.html|codemadness.org/saait]]. Page config files plus a global ''config.cfg'' plus a template dir. Generates pages, an index, an Atom feed, a twtxt.txt, ''sitemap.xml'', and ''urllist.txt'' out of the box. git clone git://codemadness.org/saait && cd saait && make ./saait -c config.cfg -o output -t templates pages/*.cfg Templates are files with ''{$var}'' substitution. Want markdown? Pre-convert with smu, lowdown, or pandoc into the pages dir first. ===== mkws ===== Shell as the templating language: ~30 lines of sh plus ~400 lines of C. Templates are shell code; you can call any unix tool from inside them. # a page is literally a shell script that prints html cat < $(lowdown file.md)

built $(date)

EOF
Zero config. You script the generator instead of configuring it. ===== stagit ===== Not a blog: suckless.org's tool for turning a git repo into a static site. ''stagit repo/'' emits a browsable HTML mirror (log, files, commits, per-file views). ''stagit-index'' builds a repo list page. Runs fine on tildes to serve repos without cgit or GitLab. ===== lb ===== Luke Smith's "blog and rss script": [[https://github.com/LukeSmithxyz/lb|LukeSmithxyz/lb]]. bashblog-descended: ''lb new'', ''lb draft'', ''lb finalize'', ''lb delete'', auto-RSS and a standalone blogroll. If bashblog feels too interactive, lb is the script-then-publish variant. ===== DIY ===== A minimal SSG is ~20 lines of shell you already own: for f in *.md; do pandoc -s --css=style.css --metadata pagetitle="$(basename $f .md)" \ "$f" -o "${f%.md}.html" done Add [[indieweb:rss_by_hand|a hand-written feed]] and that is a blog. ===== Choosing ===== * Want a blogging loop (post/edit/drafts): **bashblog** or **lb** * Want total control, few deps, hackable: **ssg** or **mkws** * Want feeds, twtxt, and sitemap from one binary: **saait** * Want your git repos browsable on the web: **stagit** * Want to understand every line: **DIY pandoc** All output is plain HTML. Push to any pubnix with rsync: [[tilde:publishing|Publishing on a Pubnix]]. ===== See Also ===== * [[indieweb:bashblog|bashblog]] * [[indieweb:pureblog|Pure Blog]] * [[indieweb:html_css|Hand-Written HTML and CSS]] * [[indieweb:start|IndieWeb Index]] * [[start|Return to wiki home]]