Move comments handling in a partial (#138)

This way it's much easier to tune the comment handling in general (like
disable it for some sections) or integrate a different commenting system
than disqus.
This commit is contained in:
Kevin Ottens 2019-03-15 11:03:46 +01:00 committed by Hanzei
parent a8f42fd1d6
commit 29aa348daa
4 changed files with 8 additions and 9 deletions

View file

@ -3,7 +3,5 @@
{{ .Content }}
</div>
<!-- End post content -->
<div class="disqus">
{{ template "_internal/disqus.html" . }}
</div>
{{ partial "comments.html" . }}
{{ end }}

View file

@ -57,7 +57,5 @@
{{ .Content }}
</div>
<!-- End blog post content -->
<div class="disqus">
{{ template "_internal/disqus.html" . }}
</div>
{{ partial "comments.html" . }}
{{ end }}

View file

@ -0,0 +1,5 @@
{{- if .Site.DisqusShortname }}
<div class="disqus">
{{ template "_internal/disqus.html" . }}
</div>
{{- end }}

View file

@ -24,9 +24,7 @@
{{ .Content }}
</div>
<!-- End post content -->
<div class="disqus">
{{ template "_internal/disqus.html" . }}
</div>
{{ partial "comments.html" . }}
{{ end }}
{{ define "customCSS" }}