mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Modified Generator Base Class in order to pass custom Jinja filters in
settings.py
This commit is contained in:
parent
f8f59502b5
commit
c421956cd9
1 changed files with 4 additions and 0 deletions
|
|
@ -36,6 +36,10 @@ class Generator(object):
|
|||
extensions=self.settings.get('JINJA_EXTENSIONS', []),
|
||||
)
|
||||
|
||||
# get custom Jinja filters from user settings
|
||||
custom_filters = self.settings.get('JINJA_FILTERS', {})
|
||||
self._env.filters.update(custom_filters)
|
||||
|
||||
def get_template(self, name):
|
||||
"""Return the template by name.
|
||||
Use self.theme to get the templates to use, and return a list of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue