Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: docs/content/globals.md

Issue 29628724: Issue 5521 - Restructure CMS documentation to make it easier to use and extend (Closed) Base URL: https://hg.adblockplus.org/cms
Patch Set: Add initial API docs Created Dec. 13, 2017, 11:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: docs/content/globals.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/docs/content/globals.md
@@ -0,0 +1,7 @@
+# Custom functions and variables #
+
+The `globals` directory can define custom Jinja2 globals which will be available
+in all Jinja2 templates. Typically, this is used for custom functions. The file
+name should match the name of the function or variable to be defined, and export
+a variable with that name. E.g. `globals/myfunction.py` can define a function
+called `myfunction` that will become available to all Jinja2 templates.
« no previous file with comments | « docs/content/filters.md ('k') | docs/content/includes.md » ('j') | docs/content/includes.md » ('J')

Powered by Google App Engine
This is Rietveld