summaryrefslogtreecommitdiffstats
path: root/nikola/jinja_templates.py
diff options
context:
space:
mode:
Diffstat (limited to 'nikola/jinja_templates.py')
-rw-r--r--nikola/jinja_templates.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/nikola/jinja_templates.py b/nikola/jinja_templates.py
deleted file mode 100644
index f55465f..0000000
--- a/nikola/jinja_templates.py
+++ /dev/null
@@ -1,37 +0,0 @@
-########################################
-# Jinja template handlers
-########################################
-
-import os
-
-import jinja2
-
-lookup = None
-cache = {}
-
-
-def get_template_lookup(directories):
- return jinja2.Environment(loader=jinja2.FileSystemLoader(
- directories,
- encoding='utf-8',
- ))
-
-
-def render_template(template_name, output_name, context, global_context):
- template = lookup.get_template(template_name)
- local_context = {}
- local_context.update(global_context)
- local_context.update(context)
- output = template.render(**local_context)
- if output_name is not None:
- try:
- os.makedirs(os.path.dirname(output_name))
- except:
- pass
- with open(output_name, 'w+') as output:
- output.write(output.encode('utf8'))
- return output
-
-
-def template_deps(template_name):
- return []