3 ms·
I went down this rabbit hole and found everything to be overcomplicated for my use case. I'm so sick of static site generators that have seven layers of templat
by na85 5y ago
I went down this rabbit hole and found everything to be overcomplicated for my use case. I'm so sick of static site generators that have seven layers of templating engines and complicated build systems.
Most of the static site builders I tried were either way too complex, or else just straight-up didn't work at all (looking at you, coleslaw).
I tried to go full emacs and use org export (org being my favorite text format) but the default export is horrendous and the documentation for org to html export is so bad it might as well not exist.
Software is simultaneously awesome and infuriating.
So after three days I just gave up on org-export and now I have pandoc shit out an html snippet that I concatenate with a hand-rolled html preamble and postamble via a Makefile.
Found a few rough edges, probably because org is underspecified. It's not elegant but it works for my use case.
- jstrieb 5y agoFor what it's worth, if you're using Pandoc, you can set the HTML output to be "standalone" based on a simple template.[0] You can also include a standard header and footer to be automatically inserted for each generated page. pandoc \ --standalone \ --css=/style.css \ --highlight-style=code-highlight.theme \ --variable=lang:en \ --include-before-body=navbar.html \ --include-after-body=footer.html \ --template=template.html \ $MD -o $HTML I use a variation of this command in a bash script to generate my entire static site.[1] A friend improved upon my script with a Go implementation that does some more advanced stuff, but still compiles Markdown to HTML using this command under the hood.[2] 0: https://pandoc.org/MANUAL.html#option--standalone https://pandoc.org/MANUAL.html#option--standalone 1: https://github.com/jstrieb/personal-site/blob/master/compile.sh https://github.com/jstrieb/personal-site/blob/master/compile... 2: https://github.com/lsnow99/dudu https://github.com/lsnow99/dudu
- wishinghand 5y agoIs this hyperbole or am I just lucky to avoid whatever you tried? What SSGs require 7 layers of templating and complicated build systems. Whenever I tried out Sergey, Nuxt, Docpad, and a few others, there was just one templating engine each and a build command for the CLI.
- breck 5y agoTry https://scroll.pub https://scroll.pub It uses Scrolldown instead of markdown, which is simpler, cleaner, and incredibly extensible. The command line app has just a few commands—-and they all take zero params. A site is just a single folder, and because content is written in Scrolldown, it works great with git and is great for content sites or collaborative strongly typed databases. It fast, I get about 300 pages per second, and not a lot of code (sub 1k excluding dependencies), and the code is tested. It’s in nodejs now but no reason scroll can’t be language agnostic. I’ve been around SSGs for over a decade and designing this one to be simple, reliable, and to stay out of the creators’ way. I think it could be the last SSG you’ll ever need.