From caf088cbfb4899e4d86fcb18373c4093f32c739b Mon Sep 17 00:00:00 2001 From: Track3 Date: Tue, 11 Dec 2018 13:41:01 +0800 Subject: Fix Disqus * Use Hugo's built-in disqus template * Add some extra style * See #9 --- layouts/_default/single.html | 6 ++++-- layouts/partials/disqus.html | 16 ---------------- layouts/posts/single.html | 6 ++++-- 3 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 layouts/partials/disqus.html (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7136bfb..8a4c168 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,8 +8,10 @@
{{ .Content }}
- {{- with .Params.comments }} - {{ with .Site.DisqusShortname }}{{ partialCached "disqus.html" . }}{{ end }} + {{- if and .Params.comments .Site.DisqusShortname }} +
+ {{ template "_internal/disqus.html" . }} +
{{- end }} {{ end }} diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html deleted file mode 100644 index b8a7c77..0000000 --- a/layouts/partials/disqus.html +++ /dev/null @@ -1,16 +0,0 @@ -
- - -comments powered by Disqus \ No newline at end of file diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 62a875b..2c94eb0 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -44,8 +44,10 @@ {{- end }} - {{- with .Site.DisqusShortname }} - {{ partialCached "disqus.html" . }} + {{- if .Site.DisqusShortname }} +
+ {{ template "_internal/disqus.html" . }} +
{{- end }} {{ end }} -- cgit v1.2.3