Skip to main content

PyPI version

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

Metadata

Release files for pandoc-jinja 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandoc-jinja 0.2.4
File Size Uploaded
pandoc_jinja-0.2.4.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pandoc-jinja 0.2.4
File Interpreter ABI Platform
pandoc_jinja-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / pandoc_jinja-0.2.4.tar.gz

Download URL pandoc_jinja-0.2.4.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bffad7c3852fc9ac1d417d2914185f9145c0daff96ae18f52079256956079e0d
BLAKE2b-256 checksum
How to use checksums
3f78f34495cc370955f066e645efda66a5ba8994cee860efa4d3f892d6e3c517
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release files / pandoc_jinja-0.2.4-py3-none-any.whl

Download URL pandoc_jinja-0.2.4-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb324847b83054148b522bebf82f82706915fb072eb04f7b75983f4b2b84166f
BLAKE2b-256 checksum
How to use checksums
b917cac19f015aeead2025fde85e5139461ca7c49fec3d29f859e6e6633733e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page