]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Merge pull request #395 from esonderegger/master
authorMarkus Unterwaditzer <markus@unterwaditzer.net>
Wed, 11 Mar 2015 20:16:25 +0000 (21:16 +0100)
committerMarkus Unterwaditzer <markus@unterwaditzer.net>
Wed, 11 Mar 2015 20:16:25 +0000 (21:16 +0100)
Updated template documentation examples

1  2 
docs/templates.rst

index d4fa6b397a822d11013ef84ff701264e2b0ec494,b154764f289cc8e086f3ed1cefff6335647b291d..d9102ecc1b636be679cfbae9a3b59a50d6bd59ab
@@@ -13,19 -13,18 +13,19 @@@ behavior of undefined values
  Synopsis
  --------
  
 -A template is simply a text file.  It can generate any text-based format
 -(HTML, XML, CSV, LaTeX, etc.).  It doesn't have a specific extension,
 -``.html`` or ``.xml`` are just fine.
 +A Jinja template is simply a text file. Jinja can generate any text-based
 +format (HTML, XML, CSV, LaTeX, etc.).  A Jinja template doesn't need to have a
 +specific extension: ``.html``, ``.xml``, or any other extension is just fine.
  
 -A template contains **variables** or **expressions**, which get replaced with
 -values when the template is evaluated, and tags, which control the logic of
 -the template.  The template syntax is heavily inspired by Django and Python.
 +A template contains **variables** and/or **expressions**, which get replaced
 +with values when a template is *rendered*; and **tags**, which control the
 +logic of the template.  The template syntax is heavily inspired by Django and
 +Python.
  
 -Below is a minimal template that illustrates a few basics.  We will cover
 -the details later in that document::
 +Below is a minimal template that illustrates a few basics using the default
 +Jinja configuration.  We will cover the details later in this document::
  
-     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+     <!DOCTYPE html>
      <html lang="en">
      <head>
          <title>My Webpage</title>
@@@ -360,10 -338,11 +359,11 @@@ document that you might use for a simpl
              {% endblock %}
          </div>
      </body>
+     </html>
  
  In this example, the ``{% block %}`` tags define four blocks that child templates
 -can fill in. All the `block` tag does is to tell the template engine that a
 -child template may override those portions of the template.
 +can fill in. All the `block` tag does is tell the template engine that a
 +child template may override those placeholders in the template.
  
  Child Template
  ~~~~~~~~~~~~~~