---
mood: happy
weather: Sunny and warm!
---
A few keys are added when you use `pageCompiler` [1]. These are:
- `url`: the destination of the page, e.g. "/posts/2011-07-08-a-post.html";
- `path`: the source, e.g. "/posts/2011-07-08-a-post.markdown";
- ...
Some other modules use other fields. This is explained in their
documentation. E.g., `renderDateField` [2] can be used to create a
`date` field based on the `path`.
[1]: http://jaspervdj.be/hakyll/reference/Hakyll-Web-Page.html#v:pageCompiler
[2]: http://jaspervdj.be/hakyll/reference/Hakyll-Web-Page-Metadata.html#v:renderDateField
Hope this helps,
Cheers,
Jasper
Investigating, this is Hakyll-specific, is it not? It seems to be
handled ad hoc in the Hakyll Page/ directory, is not covered in the
Pandoc manual and I don't see anything grepping. Also, Pandoc seems to
ignore the sections, rendering them as text.
I really would like my files to work with both Gitit and Hakyll, but I
also want to populate properly the <meta> description tag using
description:. Any chance you could ask John to generalize the
supported metadata in Pandoc to the Hakyll scheme?
--
gwern
http://www.gwern.net
Cheers,
Jasper
I wouldn't like that at all! Doubling my file count and splitting up
the logical file among multiple files and now a new extension to deal
with for MIME or Gitit purposes? No thank you... Especially since
extended metadata has been discussed for gitit/pandoc several times
before, almost always in-file.
Looking even harder, it seems that Gitit already has a metadata format
similar but not compatible with the Hakyll hack:
http://gitit.johnmacfarlane.net/README#page-metadata
Valid YAML, too. IMO, Hakyll should switch to the Gitit format as soon
as possible. The change is easy (change the second --- to ...) and the
sooner the better because of installed bases.
(I'm currently adding description: field to Gitit and then a <meta>
tag in its generated HTML.)
--
gwern
http://www.gwern.net
Cheers,
Jasper
[1] https://github.com/jaspervdj/hakyll/commit/308323bfc1e7da4b88cd83c6db265e709bec3f2c
Cheers,
Jasper
I've installed, edited all my fields, and synced. It seems to be working.
Which makes me think about another question; my description fields are
decent abstracts, which I've long felt my articles need. Does anyone
have good ideas on how to visually present them on pages? Just putting
them in my usual > quotes would clash with articles which already have
quotes as prefaces or epigraphs.
--
gwern
http://www.gwern.net