fix incorrect js path generation

This commit is contained in:
Massimo Maggioni 2022-02-10 22:10:57 +01:00
parent ccc12b974b
commit 3ca2e09da4
2 changed files with 3 additions and 3 deletions

View File

@ -5,4 +5,4 @@ plugins:
title: Google Analytics title: Google Analytics
description: This code gives us insight into the number of people that visit our website, where they are from and what they are clicking on. We follow the guidelines of the Italian Government. description: This code gives us insight into the number of people that visit our website, where they are from and what they are clicking on. We follow the guidelines of the Italian Government.
html_src: gdpr/gtag.html html_src: gdpr/gtag.html
js_src: js/gtag.js js_src: gtag.js

View File

@ -34,7 +34,7 @@
{{ "<!-- " }} {{ $plugin.name }} {{ "start -->" }} {{ "<!-- " }} {{ $plugin.name }} {{ "start -->" }}
{{ partial $plugin.html_src }} {{ partial $plugin.html_src }}
{{ if $plugin.functional }} {{ if $plugin.functional }}
<script type="text/javascript" src="{{ $plugin.js_src }}"></script> <script type="text/javascript" src="/js/{{ $plugin.js_src }}"></script>
{{ end }} {{ end }}
{{ "<!-- " }} {{ $plugin.name }} {{ "end -->" }} {{ "<!-- " }} {{ $plugin.name }} {{ "end -->" }}
{{ end }} {{ end }}
@ -68,7 +68,7 @@
const scripts = []; const scripts = [];
{{ range $index, $plugin := .Site.Data.gdpr.plugins }} {{ range $index, $plugin := .Site.Data.gdpr.plugins }}
{{ if and $plugin.enabled (not $plugin.functional) }} {{ if and $plugin.enabled (not $plugin.functional) }}
scripts[{{ $index }}] = "{{ $plugin.js_src }}"; scripts[{{ $index }}] = "/js/{{ $plugin.js_src }}";
{{ end }} {{ end }}
{{ end }} {{ end }}