A number of static site generators and/or Markdown implementations support the notion of a "front matter", a (normally) YAML list pre- pended before the document text, containing document metadata. E.g.:
---
title: how to blog
author: Joe Bloggs
---
document goes here
IkiWiki has (currently) made a deliberate decision not to support these (or
more precisely, the similar but different Pandoc-style block with lines
prefixed by '%'). Quoting mdwn.pm
(here in the section that handles
Discount):
# Disable Pandoc-style % Title, % Author, % Date
# Use the meta plugin instead
$always_flags |= Text::Markdown::Discount::MKD_NOHEADER();
It would be good to support YAML-formatted pre-pended metadata, translating recognised keys into meta definitions, to aid migration between IkiWiki and other static site generators: it would aid the same source files being useable in multiple systems.
This would require the mdwn
plugin to be more closely-coupled to
the meta
plugin, but not the reverse. I think this wouldn't be a
big problem, as the prospect of an IkiWiki site that was using the
mdwn
plugin but not the meta
plugin is fairly remote. And we
could make front-matter handling configurably on or off.
References: * Pandoc extension yaml_metadata_block * Hakyll 'pages and metadata' * Jekyll 'front matter'
— Jon, 2021-10-15