mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +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 }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
<!-- End post content -->
|
<!-- End post content -->
|
||||||
<div class="disqus">
|
{{ partial "comments.html" . }}
|
||||||
{{ template "_internal/disqus.html" . }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -57,7 +57,5 @@
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
<!-- End blog post content -->
|
<!-- End blog post content -->
|
||||||
<div class="disqus">
|
{{ partial "comments.html" . }}
|
||||||
{{ template "_internal/disqus.html" . }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ 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 }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
<!-- End post content -->
|
<!-- End post content -->
|
||||||
<div class="disqus">
|
{{ partial "comments.html" . }}
|
||||||
{{ template "_internal/disqus.html" . }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "customCSS" }}
|
{{ define "customCSS" }}
|
||||||
|
|
Loading…
Reference in a new issue