From 2e1e4934b60ce8081a7f3a79191ed204f3098481 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 27 Jun 2017 06:40:01 -0500 Subject: [PATCH] tpl: Improve the built-in Disqus template (#3639) * Improve the built-in Disqus template Set `disqus_identifier`, `disqus_title`, and `disqus_url` only if the user has explicitly provided them. Do not load Disqus when the website is previewed locally, otherwise it is very confusing. * Use disqus_config instead of three global variables https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables --- tpl/tplimpl/template_embedded.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go index fb5ce71e9..1e5d246de 100644 --- a/tpl/tplimpl/template_embedded.go +++ b/tpl/tplimpl/template_embedded.go @@ -167,14 +167,18 @@ func (t *templateHandler) embedTemplates() { t.addInternalTemplate("", "disqus.html", `{{ if .Site.DisqusShortname }}