Would you like to add #metadata via the command line, but feel limited because arguments to `--metadata`/`-M` are not treated as #Markdown? Here's a #LuaFilter to solve this:
function Meta (meta)
for key, value in pairs(meta) do
if type(value) == 'string' then
meta[key] = pandoc.utils.blocks_to_inlines(
pandoc.read(value).blocks)
end
end
return meta
end
Example:
pandoc -L parse-md-in-metadata.lua \
-M title='Defend democracy *now*!' …