Sample code from the official jinja website:
{% if not standalone %}{% extends 'master.html' %}{% endif -%} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <title>{% block title %}The Page Title{% endblock %}</title> <link rel="stylesheet" href="style.css" type="text/css"> {% block body %} <p>This is the page body.</p> {% endblock %}
As I understand it, when autonomously true, the following code is output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <title>{% block title %}The Page Title{% endblock %}</title> <link rel="stylesheet" href="style.css" type="text/css"> {% block body %} <p>This is the page body.</p> {% endblock %}
And if the offline value is false, this prints:
{% if not standalone %} <<master.html code>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <title>{% block title %}The Page Title{% endblock %}</title> <link rel="stylesheet" href="style.css" type="text/css"> {% block body %} <p>This is the page body.</p> {% endblock %}
It seems very strange. I am clearly missing something obvious, what is it?
source share