Render pandoc metadata variables inside the document
Project description
pandoc-jinja
Render pandoc metadata inside the document itself
Example
Write a markdown file, define metadata variable, and use them inside the with double brackets.
---
title: 'Greetings !'
bonjour: 'Hello'
...
## {{ title | upper }}
{{ bonjour }}, {{name}} !
You can also define variable from the command line
with --metadata
or --metadata-file
:
$ pandoc foo.md --filter=pandoc-jinja --metadata=name:world
<h2 id="title">GREETINGS !</h2>
<p>Hello, world !</p>
Disclaimer
-
This filter is slow. In most cases, it is probably more efficient to render the entire document once and for all with jinja and then pass it to pandoc.
-
Jinja conditionals and loops are not supported.
Install
pip install pandoc-jinja
Similar filters
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pandoc-jinja-0.1.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for pandoc_jinja-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c8b277ecbda7600e9e310a8a84c81dd425388a9cf9cc50334e22aa3101b896 |
|
MD5 | 99b47be2cdb56f73a5d75cc6fe656c07 |
|
BLAKE2b-256 | 3c1833770f6a9328a7e411ed8123fe8642dbdbde7511d4b7e54aab1fb5cd8362 |