Merge pull request #53 from benjamin-smith/feature/whitespace-control
prevent whitespace from jinja control structures from making it into templatespull/56/head 1.9.1
commit
f7e43de918
@ -1,33 +1,39 @@ |
|||||||
{% for vhost in nginx_vhosts %} |
{% for vhost in nginx_vhosts -%} |
||||||
server { |
server { |
||||||
|
|
||||||
listen {{ vhost.listen | default('80 default_server') }}; |
listen {{ vhost.listen | default('80 default_server') }}; |
||||||
|
|
||||||
{% if vhost.server_name is defined %} |
{% if vhost.server_name is defined %} |
||||||
server_name {{ vhost.server_name }}; |
server_name {{ vhost.server_name }}; |
||||||
{% endif %} |
{% endif %} |
||||||
|
|
||||||
{% if vhost.root is defined %} |
{%- if vhost.root is defined -%} |
||||||
root {{ vhost.root }}; |
root {{ vhost.root }}; |
||||||
{% endif %} |
{% endif %} |
||||||
|
|
||||||
index {{ vhost.index | default('index.html index.htm') }}; |
{%- if vhost.index is defined -%} |
||||||
|
index {{ vhost.index }}; |
||||||
|
{% endif %} |
||||||
|
|
||||||
{% if vhost.error_page is defined %} |
{%- if vhost.error_page is defined -%} |
||||||
error_page {{ vhost.error_page }}; |
error_page {{ vhost.error_page }}; |
||||||
{% endif %} |
{% endif %} |
||||||
{% if vhost.access_log is defined %} |
|
||||||
|
{%- if vhost.access_log is defined -%} |
||||||
access_log {{ vhost.access_log }}; |
access_log {{ vhost.access_log }}; |
||||||
{% endif %} |
{% endif %} |
||||||
{% if vhost.error_log is defined %} |
|
||||||
|
{%- if vhost.error_log is defined -%} |
||||||
error_log {{ vhost.error_log }} error; |
error_log {{ vhost.error_log }} error; |
||||||
{% endif %} |
{% endif %} |
||||||
|
|
||||||
{% if vhost.return is defined %} |
{%- if vhost.return is defined -%} |
||||||
return {{ vhost.return }}; |
return {{ vhost.return }}; |
||||||
{% endif %} |
{% endif %} |
||||||
|
|
||||||
{% if vhost.extra_parameters is defined %} |
{%- if vhost.extra_parameters is defined -%} |
||||||
{{ vhost.extra_parameters }} |
{{ vhost.extra_parameters }} |
||||||
{% endif %} |
{% endif %} |
||||||
|
|
||||||
} |
} |
||||||
{% endfor %} |
{% endfor %} |
||||||
|
Reference in new issue