metavars - interpolate metadata {{field}} references
{{field}} references
Pandoc filter to allow interpolation of metadata fields into a document. Field references such as {{field}} will be replaced by the field's value or by an empty string. Spaces in, before, and after field names are not allowed.
{{field}}
Metadata fields of type MetaString and MetaInlines are always replaced in inline elements (string elements). Metadata fields of type MetaBlocks are also replaced in block elements if the reference is the only content of the block.
To literally include a field reference, define and include another field with content '{{field}}'.
'{{field}}'
pandoc --filter metavars.pl -o output.html < input.md
This is an improved port of metavars.py from Python to Perl with Pandoc::Elements and Pandoc::Filter.
1 POD Error
The following errors were encountered while parsing the POD:
Unterminated C<...> sequence
To install Pandoc::Elements, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pandoc::Elements
CPAN shell
perl -MCPAN -e shell install Pandoc::Elements
For more information on module installation, please visit the detailed CPAN module installation guide.