forked from github/pelican
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
|
|
@ -35,6 +35,10 @@ class Generator(object):
|
|||
loader=FileSystemLoader(self._templates_path),
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue