https://github.com/daamien/pandoc-jinja
Render pandoc metadata inside the document itself
https://github.com/daamien/pandoc-jinja
Last synced: 7 months ago
JSON representation
Render pandoc metadata inside the document itself
- Host: GitHub
- URL: https://github.com/daamien/pandoc-jinja
- Owner: daamien
- License: bsd-2-clause
- Created: 2022-12-22T15:26:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T06:50:22.000Z (about 1 year ago)
- Last Synced: 2024-11-06T12:17:31.614Z (7 months ago)
- Language: Python
- Size: 26.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.org/project/pandoc-jinja/)
# 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.```mardown
---
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:worldGREETINGS !
Hello, world !
```## 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
* [pandoc-mustache](https://github.com/michaelstepner/pandoc-mustache)
* [pandoc-abbreviations](https://github.com/scokobro/pandoc-abbreviations)