parse_pages - example of how to add functions to md preprocessor

This commit is contained in:
mDuo13
2015-11-17 16:37:06 -08:00
parent 0bc2bb4fef
commit 708f994abb

View File

@@ -123,6 +123,8 @@ def render_pages(precompiled, target=DEFAULT_TARGET):
env.trim_blocks = True
pp_env = Environment(loader=FileSystemLoader(CONTENT_PATH))
#Example: if we want to add custom functions to the md files
#pp_env.globals['foo'] = lambda x: "FOO %s"%x
for currentpage in pages: