Skip to content
Permalink
Browse files
fix #2166
  • Loading branch information
ralsina committed Dec 18, 2015
1 parent 4195681 commit fc99b382ebfdc8961afe803082d8551f4c700da3
Showing with 5 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +4 −1 nikola/plugins/template/jinja.py
@@ -4,6 +4,7 @@ New in master
Features
--------

* Added cache for Jinja templates (Issue #2166)
* Use Jupyter instead of IPython shims (Issue #1938)
* Automatically open gallery images colorbox based on URL fragment (Issue #2146)

@@ -52,7 +52,10 @@ def __init__(self):
"""Initialize Jinja2 environment with extended set of filters."""
if jinja2 is None:
return
self.lookup = jinja2.Environment()
# Not ideal because it's not using our cache structure
# but we don't have that folder at init time
cache = jinja2.FileSystemBytecodeCache()
self.lookup = jinja2.Environment(bytecode_cache=cache)
self.lookup.trim_blocks = True
self.lookup.lstrip_blocks = True
self.lookup.filters['tojson'] = json.dumps

0 comments on commit fc99b38

Please sign in to comment.