Fix some recently broken embedded templates

And add tests for them.

Fixes #4757
This commit is contained in:
Bjørn Erik Pedersen
2018-05-23 10:03:11 +02:00
parent 4ddcf52ccc
commit 35ccf06dae
11 changed files with 111 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}}
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if not $pc.Disable -}}
{{ with .Site.GoogleAnalytics }}
<script>
@@ -15,7 +15,7 @@ if (!doNotTrack) {
{{ end }}
{{- end -}}
{{- define "__ga_js_set_doNotTrack" -}}{{/* This is also used in the async version. */}}
{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}}
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if not $pc.RespectDoNotTrack -}}
var doNotTrack = false;
{{- else -}}