Skip to content

Commit c534967

Browse files
committed
[IMP] odoo_theme: allow to add plausible script
export PLAUSIBLE_SCRIPT=https://plausible.io/js/script.js export PLAUSIBLE_DOMAIN=yourdomain.com closes #1950 X-original-commit: 4c526eb Signed-off-by: Antoine Vandevenne (anv) <[email protected]> Signed-off-by: Jérémy Kersten <[email protected]>
1 parent 98f306e commit c534967

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO
1919
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
2020
-D is_remote_build=$(IS_REMOTE_BUILD) \
2121
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY) \
22+
-A plausible_script=$(PLAUSIBLE_SCRIPT) \
23+
-A plausible_domain=$(PLAUSIBLE_DOMAIN) \
2224
-j $(WORKERS)
2325
SOURCE_DIR = content
2426

extensions/odoo_theme/layout.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
{%- endfor %}
3030
{%- endif %}
3131
{{ super() }} {# Load the scripts specified in the extensions/themes #}
32+
{%- if plausible_script -%}
33+
<script defer="defer" src="{{ plausible_script }}" data-domain="{{ plausible_domain }}"></script>
34+
{%- endif -%}
3235
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
3336
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
3437
crossorigin="anonymous"></script>

0 commit comments

Comments
 (0)