Dear all,
I've been enjoying fiddling with Hakyll — it's so neat to have a
static website engine written in a programming language I both
understand and enjoy. Thanks, Jasper (and others) for all the work
you've put into it. I'm planning on moving my site over to Hakyll, and
things seem to be going very well.
I am interested in finding out the best way to do the following. I've
got lots of raw pages (currently processed a different static blog
engine), which produce the pages at
http://consequently.org/writing —
there's a page for each paper, and for each page, there's the abstract
(in the body of the page) and a bunch of metadata: title, citation,
name of the pdf file, doi, etc. However, some items have some pieces
of metadata and not all (only recent papers have dois, for example).
I've handled this with my previous website software — which embeds
code in templates — with a heap of conditional statements (if $doi$ is
defined, then include this here…; if $filename$ is defined, then
include this here…, etc).
What is the best practice for doing this sort of thing with Hakyll?
I'd like to have master template to indicate where all of the
components on the resulting html page will go, and then the logic in
hakyll.hs sorting out what goes where.
Any advice will be most welcome. I'm sorry if this is all explicitly
described in the references somewhere — I'm still getting my head
around how it all works.
Thanks,
Greg