[IMP] odoo_theme: allow to add plausible script

export PLAUSIBLE_SCRIPT=https://plausible.io/js/script.js
export PLAUSIBLE_DOMAIN=yourdomain.com

X-original-commit: 4c526eb02f
This commit is contained in:
Jeremy Kersten 2022-05-06 17:03:06 +02:00
parent 663157179f
commit 208d3f3f5b
2 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,8 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
-D is_remote_build=$(IS_REMOTE_BUILD) \
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY) \
-A plausible_script=$(PLAUSIBLE_SCRIPT) \
-A plausible_domain=$(PLAUSIBLE_DOMAIN) \
-j $(WORKERS)
SOURCE_DIR = content

View File

@ -29,6 +29,9 @@
{%- endfor %}
{%- endif %}
{{ super() }} {# Load the scripts specified in the extensions/themes #}
{%- if plausible_script -%}
<script defer="defer" src="{{ plausible_script }}" data-domain="{{ plausible_domain }}"></script>
{%- endif -%}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"></script>