diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index d30352502..033d8defc 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -76,7 +76,9 @@ var EmbeddedTemplates = [][2]string{ {{ end }} `}, - {`disqus.html`, `{{ if .Site.DisqusShortname }}
+ {`disqus.html`, `{{- $pc := .Page.Site.PrivacyConfig.Disqus -}} +{{- if not $pc.Disable -}} +{{ if .Site.DisqusShortname }} -comments powered by Disqus{{end}}`}, - {`google_analytics.html`, `{{ with .Site.GoogleAnalytics }} +comments powered by Disqus{{end}} +{{- end -}}`}, + {`google_analytics.html`, `{{- $pc := .Page.Site.PrivacyConfig.GoogleAnalytics -}} +{{- if not $pc.Disable -}} +{{ with .Site.GoogleAnalytics }} -{{ end }}`}, - {`google_analytics_async.html`, `{{ with .Site.GoogleAnalytics }} +{{ end }} +{{- end -}}`}, + {`google_analytics_async.html`, `{{- $pc := .Page.Site.PrivacyConfig.GoogleAnalytics -}} +{{- if not $pc.Disable -}} +{{ with .Site.GoogleAnalytics }} -{{ end }}`}, +{{ end }} +{{- end -}}`}, {`google_news.html`, `{{ if .IsPage }}{{ with .Params.news_keywords }} {{ end }}{{ end }}`}, @@ -238,19 +247,33 @@ ga('send', 'pageview'); `}, {`shortcodes/gist.html`, ``}, {`shortcodes/highlight.html`, `{{ if len .Params | eq 2 }}{{ highlight (trim .Inner "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .Inner "\n\r") (.Get 0) "" }}{{ end }}`}, - {`shortcodes/instagram.html`, `{{ if len .Params | eq 2 }}{{ if eq (.Get 1) "hidecaption" }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=1" }}{{ .html | safeHTML }}{{ end }}{{ end }}{{ else }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=0" }}{{ .html | safeHTML }}{{ end }}{{ end }}`}, + {`shortcodes/instagram.html`, `{{- $pc := .Page.Site.PrivacyConfig.Instagram -}} +{{- if not $pc.Disable -}} +{{ if len .Params | eq 2 }}{{ if eq (.Get 1) "hidecaption" }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=1" }}{{ .html | safeHTML }}{{ end }}{{ end }}{{ else }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=0" }}{{ .html | safeHTML }}{{ end }}{{ end }} +{{- end -}}`}, {`shortcodes/ref.html`, `{{ if len .Params | eq 2 }}{{ ref .Page (.Get 0) (.Get 1) }}{{ else }}{{ ref .Page (.Get 0) }}{{ end }}`}, {`shortcodes/relref.html`, `{{ if len .Params | eq 2 }}{{ relref .Page (.Get 0) (.Get 1) }}{{ else }}{{ relref .Page (.Get 0) }}{{ end }}`}, - {`shortcodes/speakerdeck.html`, ``}, - {`shortcodes/tweet.html`, `{{ (getJSON "https://api.twitter.com/1/statuses/oembed.json?id=" (index .Params 0)).html | safeHTML }}`}, - {`shortcodes/vimeo.html`, `{{ if .IsNamedParams }}