commit de8ac828cfd8c039c8280e7163863ad58ab870c1
parent f492480eb2125a19f3413e3db85abb11cb98cccd
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Tue, 24 Oct 2017 23:43:52 -0500
Created standalone partial template for isso, and enable it only for single pages.
Diffstat:
3 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -17,4 +17,6 @@
{{ .Content }}
</main>
+<!-- Enable Comments -->
+{{ partial "comment.html" . }}
{{ partial "footer.html" . }}
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
@@ -0,0 +1,18 @@
+<!-- Isso support -->
+<script data-isso="/isso/"
+ data-isso-css="true"
+ data-isso-lang={{ .Site.Language }}
+ data-isso-reply-to-self="false"
+ data-isso-require-author="true"
+ data-isso-require-email="true"
+ data-isso-max-comments-top="10"
+ data-isso-max-comments-nested="5"
+ data-isso-reveal-on-click="5"
+ data-isso-avatar="true"
+ data-isso-avatar-bg="#ffffff"
+ data-isso-avatar-fg="#710100"
+ data-isso-vote="false"
+ data-vote-levels=""
+ src="/isso/js/embed.min.js"></script>
+<section id="isso-thread"></section>
+{{ end }}
diff --git a/layouts/partials/foot_custom.html b/layouts/partials/foot_custom.html
@@ -1,24 +1,6 @@
<!-- MathJax Support -->
<script src="/js/math-code.js"></script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
-<!-- Isso support, do not enable in home page. -->
-{{if not .IsHome}}
-<script data-isso="/isso/"
- data-isso-css="true"
- data-isso-lang={{ .Site.Language }}
- data-isso-reply-to-self="false"
- data-isso-require-email="true"
- data-isso-max-comments-top="10"
- data-isso-max-comments-nested="5"
- data-isso-reveal-on-click="5"
- data-isso-avatar="true"
- data-isso-avatar-bg="#ffffff"
- data-isso-avatar-fg="#710100"
- data-isso-vote="false"
- data-vote-levels=""
- src="/isso/js/embed.min.js"></script>
-<section id="isso-thread"></section>
-{{ end }}
<!-- Translated footer -->
{{ with i18n "footer" }}