From 3ca2e09da464b1ee76b0be2271160f77c67ff5bc Mon Sep 17 00:00:00 2001
From: Massimo Maggioni <94243057+MassimoMaggioni@users.noreply.github.com>
Date: Thu, 10 Feb 2022 22:10:57 +0100
Subject: [PATCH] fix incorrect js path generation
---
data/gdpr.yaml | 2 +-
layouts/partials/gdpr/banner.html | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/data/gdpr.yaml b/data/gdpr.yaml
index facbd94..d9a45c6 100644
--- a/data/gdpr.yaml
+++ b/data/gdpr.yaml
@@ -5,4 +5,4 @@ plugins:
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.
html_src: gdpr/gtag.html
- js_src: js/gtag.js
+ js_src: gtag.js
diff --git a/layouts/partials/gdpr/banner.html b/layouts/partials/gdpr/banner.html
index 9aa95f6..9d5e31d 100644
--- a/layouts/partials/gdpr/banner.html
+++ b/layouts/partials/gdpr/banner.html
@@ -34,7 +34,7 @@
{{ "" }}
{{ partial $plugin.html_src }}
{{ if $plugin.functional }}
-
+
{{ end }}
{{ "" }}
{{ end }}
@@ -68,7 +68,7 @@
const scripts = [];
{{ range $index, $plugin := .Site.Data.gdpr.plugins }}
{{ if and $plugin.enabled (not $plugin.functional) }}
- scripts[{{ $index }}] = "{{ $plugin.js_src }}";
+ scripts[{{ $index }}] = "/js/{{ $plugin.js_src }}";
{{ end }}
{{ end }}