3 ms·
I don't want to get into any arguments about "best", but what works best for me is to write the pages in Markdown and use a Makefile to convert them all to html
by bachmeier 9y ago
I don't want to get into any arguments about "best", but what works best for me is to write the pages in Markdown and use a Makefile to convert them all to html. There's always overhead with projects like Hugo, concerns about upgrading, and rough edges with respect to customization. If you just want to create standalone pages, a Makefile and Pandoc is about as simple and flexible as you can get.
Edit: Here's the full code from one of my Makefiles:
files := $(patsubst %.md,%,$(wildcard *.md))
all:
for f in $(files); do \
pandoc -s -o $$f.html --template=template.html $$f.md; \
done
- Scarbutt 9y agoDoes that template.html has some css links? if so, is that something that comes with pandoc?
- bachmeier 9y agoIt's a modification of the default Pandoc template. I add css to it directly, but it can load css files if you wish. Think of it like this - there's a $body$ statement in the middle of the template. The html generated by Pandoc goes there. Everything else in the template file stays there. You can view the Pandoc html5 default here: https://github.com/jgm/pandoc/blob/master/data/templates/default.html5 https://github.com/jgm/pandoc/blob/master/data/templates/def...
- ubercow 9y agoIf you want something a little more involved, https://jaspervdj.be/hakyll/ https://jaspervdj.be/hakyll/ is a static site generator that uses pandoc under the hood. Uses a Haskell DSL