mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-22 16:02:24 +02:00
22 lines
943 B
Django/Jinja
22 lines
943 B
Django/Jinja
{# Allow multiple sub_filters #}
|
|
sub_filter_once off;
|
|
sub_filter_types text/html;
|
|
|
|
{% set features_css_final = applications.get(application_id).get('features').get('css') | bool %}
|
|
{% set features_matomo_final = applications.get(application_id).get('features').get('matomo') | bool %}
|
|
|
|
|
|
{% if features_matomo_final | bool %}
|
|
{# Include Global Matomo Tracking #}
|
|
{% include 'roles/nginx-modifier-matomo/templates/matomo-tracking.conf.j2' %}
|
|
{% endif %}
|
|
|
|
{% if features_css_final | bool or features_matomo_final | bool %}
|
|
sub_filter '</head>' '{% if features_matomo_final | bool %}{% include 'roles/nginx-modifier-matomo/templates/script.j2' %}{% endif %}{% if features_css_final | bool %}{% include 'roles/nginx-modifier-css/templates/link.j2' %}{% endif %}</head>';
|
|
{% endif %}
|
|
|
|
{% if features_css_final | bool %}
|
|
{# Include Global CSS Location #}
|
|
{% include 'roles/nginx-modifier-css/templates/location.conf.j2' %}
|
|
{% endif %}
|