From: David Lord Date: Fri, 18 Oct 2019 18:37:37 +0000 (-0700) Subject: document lack of file extension X-Git-Tag: 2.11.0~38^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36ba2502024dbe57fff33ba684c2888a940ccd63;p=thirdparty%2Fjinja.git document lack of file extension closes #547 --- diff --git a/docs/templates.rst b/docs/templates.rst index 46a237f4..409751a3 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -57,6 +57,20 @@ configured as follows: * ``# ... ##`` for :ref:`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