diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-05-23 10:03:11 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-05-23 10:03:11 +0200 |
commit | 35ccf06daeaf86176c1341dde4207c3b11653d7a (patch) | |
tree | 1191bc00ec7452cea7b399ed9906254b2d57c729 /tpl/tplimpl/embedded | |
parent | 4ddcf52ccc7af3e23109ebaac1f0486087a212ba (diff) |
Fix some recently broken embedded templates
And add tests for them.
Fixes #4757
Diffstat (limited to 'tpl/tplimpl/embedded')
-rw-r--r-- | tpl/tplimpl/embedded/templates.autogen.go | 6 | ||||
-rwxr-xr-x | tpl/tplimpl/embedded/templates/google_analytics.html | 4 | ||||
-rwxr-xr-x | tpl/tplimpl/embedded/templates/google_analytics_async.html | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index bd33e77b5..3f55d2086 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -99,7 +99,7 @@ var EmbeddedTemplates = [][2]string{ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>{{end}} {{- end -}}`}, - {`google_analytics.html`, `{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}} + {`google_analytics.html`, `{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}} {{- if not $pc.Disable -}} {{ with .Site.GoogleAnalytics }} <script> @@ -116,7 +116,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 -}} @@ -124,7 +124,7 @@ var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack); var doNotTrack = (dnt == "1" || dnt == "yes"); {{- end -}} {{- end -}}`}, - {`google_analytics_async.html`, `{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}} + {`google_analytics_async.html`, `{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}} {{- if not $pc.Disable -}} {{ with .Site.GoogleAnalytics }} <script> diff --git a/tpl/tplimpl/embedded/templates/google_analytics.html b/tpl/tplimpl/embedded/templates/google_analytics.html index 8c7951b58..ae4898c7a 100755 --- a/tpl/tplimpl/embedded/templates/google_analytics.html +++ b/tpl/tplimpl/embedded/templates/google_analytics.html @@ -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 -}} diff --git a/tpl/tplimpl/embedded/templates/google_analytics_async.html b/tpl/tplimpl/embedded/templates/google_analytics_async.html index 48a24c1c0..b81ade025 100755 --- a/tpl/tplimpl/embedded/templates/google_analytics_async.html +++ b/tpl/tplimpl/embedded/templates/google_analytics_async.html @@ -1,4 +1,4 @@ -{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}} +{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}} {{- if not $pc.Disable -}} {{ with .Site.GoogleAnalytics }} <script> |