]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
document lack of file extension
authorDavid Lord <davidism@gmail.com>
Fri, 18 Oct 2019 18:37:37 +0000 (11:37 -0700)
committerDavid Lord <davidism@gmail.com>
Fri, 18 Oct 2019 18:37:37 +0000 (11:37 -0700)
closes #547

docs/templates.rst

index 46a237f45fa266e95cc94fe87c9c527de0f79498..409751a39a523a5db01dc26a5a9ba0ea8662051a 100644 (file)
@@ -57,6 +57,20 @@ configured as follows:
 * ``#  ... ##`` for :ref:`Line Statements <line-statements>`
 
 
+Template File Extension
+~~~~~~~~~~~~~~~~~~~~~~~
+
+As stated above, any file can be loaded as a template, regardless of
+file extension. Adding a ``.jinja`` extension, like ``user.html.jinja``
+may make it easier for some IDEs or editor plugins, but is not required.
+Autoescaping, introduced later, can be applied based on file extension,
+so you'll need to take the extra suffix into account in that case.
+
+Another good heuristic for identifying templates is that they are in a
+``templates`` folder, regardless of extension. This is a common layout
+for projects.
+
+
 .. _variables:
 
 Variables