aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorTrack3 <pengliabc@live.cn>2018-12-30 11:06:38 +0800
committerTrack3 <pengliabc@live.cn>2018-12-30 11:06:38 +0800
commitefb0b592a0072ce69be4b8afdfc859d5ae5dbe1b (patch)
tree946aced4ba5fbd5fdb1d74efb9d09e8dae0790ec /layouts
parent6f864b437d6f43c1b30aadf1acad93f7b73e20f2 (diff)
Put comments into a partial
* Also removed unnecessary Disqus style (didn't regenerate resources)
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html6
-rw-r--r--layouts/partials/comments.html3
-rw-r--r--layouts/posts/single.html6
3 files changed, 8 insertions, 7 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 53d566d..dafac9f 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -8,9 +8,9 @@
<div class="content">
{{ .Content }}
</div>
- {{- if and .Params.comments .Site.DisqusShortname }}
- <div id="disqus" class="thin">
- {{ template "_internal/disqus.html" . }}
+ {{- if .Params.comments }}
+ <div id="comments" class="thin">
+ {{ partial "comments.html" . }}
</div>
{{- end }}
</main>
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
new file mode 100644
index 0000000..b17632a
--- /dev/null
+++ b/layouts/partials/comments.html
@@ -0,0 +1,3 @@
+{{- if .Site.DisqusShortname }}
+{{ template "_internal/disqus.html" . }}
+{{- end }}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index c84c50c..a748b95 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -50,11 +50,9 @@
</a>
{{- end }}
</div>
- {{- if .Site.DisqusShortname }}
- <div id="disqus" class="thin">
- {{ template "_internal/disqus.html" . }}
+ <div id="comments" class="thin">
+ {{ partial "comments.html" . }}
</div>
- {{- end }}
</main>
{{ end }}