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

Unified Diff: docs/content/filters.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/filters.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/docs/content/filters.md
@@ -0,0 +1,8 @@
+# Custom filters #
+
+The `filters` directory can define custom Jinja2 filters which will be available
+in all Jinja2 templates. The file name defines the filter name, e.g.
+`filters/myfilter.py` will define a filter named `myfilter`. This file should
+also contain a function called `myfilter`, this one will be called when the
+filter is invoked. For more information on Jinja2 filters see
+[official documentation](http://jinja.pocoo.org/docs/dev/api/#writing-filters).
« no previous file with comments | « docs/api/variables.md ('k') | docs/content/globals.md » ('j') | docs/content/includes.md » ('J')

Powered by Google App Engine
This is Rietveld