mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 14:42:54 +00:00
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:
parent
a8f42fd1d6
commit
29aa348daa
4 changed files with 8 additions and 9 deletions
|
@ -3,7 +3,5 @@
|
|||
{{ .Content }}
|
||||
</div>
|
||||
<!-- End post content -->
|
||||
<div class="disqus">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -57,7 +57,5 @@
|
|||
{{ .Content }}
|
||||
</div>
|
||||
<!-- End blog post content -->
|
||||
<div class="disqus">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
|
|
5
layouts/partials/comments.html
Normal file
5
layouts/partials/comments.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- if .Site.DisqusShortname }}
|
||||
<div class="disqus">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{- end }}
|
|
@ -24,9 +24,7 @@
|
|||
{{ .Content }}
|
||||
</div>
|
||||
<!-- End post content -->
|
||||
<div class="disqus">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "customCSS" }}
|
||||
|
|
Loading…
Reference in a new issue