diff --git a/exampleSite/config.toml b/exampleSite/config.toml index d17a555..2f6c629 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -25,6 +25,7 @@ pygmentsCodefencesGuessSyntax = true readingTime = true useHLJS = true socialShare = true + delayDisqus = false # gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic" #[[Params.bigimg]] diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7a9af29..47d01ec 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -41,9 +41,23 @@ {{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }} {{ if .Site.DisqusShortname }} + {{ if .Site.Params.delayDisqus }} +
+ +
+ + +
+ {{ else }}
{{ template "_internal/disqus.html" . }}
+ {{ end }} {{ end }} {{ if .Site.Params.staticman }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c91db68..ebc0ac3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -112,4 +112,28 @@ {{ end }} +{{ if (.Site.Params.delayDisqus) (and .Site.DisqusShortname) }} + + + + +{{ end }} + {{- partial "footer_custom.html" . }}