Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colinsullivan/jinja2-footnoteremover
A simple filter for the Jinja2 templating engine that removes footnotes from rendered text. Useful when rendering article excerpts.
https://github.com/colinsullivan/jinja2-footnoteremover
Last synced: 5 days ago
JSON representation
A simple filter for the Jinja2 templating engine that removes footnotes from rendered text. Useful when rendering article excerpts.
- Host: GitHub
- URL: https://github.com/colinsullivan/jinja2-footnoteremover
- Owner: colinsullivan
- Created: 2012-10-16T00:35:18.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-16T00:51:00.000Z (about 12 years ago)
- Last Synced: 2024-10-18T09:26:56.845Z (27 days ago)
- Language: Python
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This is a basic filter for the Jinja2 templating language that removes markdown footnotes from rendered text. For example, the text:
Lorem ipsum dolor sit amet[^footnote1], consectetur adipiscing elit. Maecenas id feugiat odio. Ut volutpat congue mattis. Cras[^footnote2] quis enim vel tellus pellentesque fermentum.
Would be rendered as:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id feugiat odio. Ut volutpat congue mattis. Cras quis enim vel tellus pellentesque fermentum.To install:
python setup.py install
To use with Jinja2:
env = Environment(extensions=['FootnoteRemover.FootnoteRemover'])
To use with Hyde, in `site.yaml`:
jinja2:
extensions:
- FootnoteRemover.FootnoteRemoverAnd then in a template:
{{ post.excerpt|removefootnotes|markdown|typogrify }}