Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/hossainemruz/toha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily <734204679@qq.com>2021-10-28 18:11:25 +0300
committerGitHub <noreply@github.com>2021-10-28 18:11:25 +0300
commit098179ec1ffd0bd9408d145123f0338346e9fa28 (patch)
treefed996af5c9464139d5c060e5949dca2745c13b4 /layouts/_default
parentff86f78b4ddcfe26991f16506e04b28a14a9e93a (diff)
Add valine comment system support (#446)
* feat: add valine support * Adjust the comment config * Adjust the comment config * Make comment section backward compatible with old config Signed-off-by: hossainemruz <hossainemruz@gmail.com> Co-authored-by: hossainemruz <hossainemruz@gmail.com>
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/single.html18
1 files changed, 16 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 3bd38b5..2423a98 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -155,10 +155,24 @@
<hr />
{{ partial "navigators/next-prev-navigator.html" . }}
<hr />
- <!-- Add Disqus forum -->
+
+ <!----- Add comment support ----->
+ {{ with site.Params.features.comment }}
+ {{ if .enable }}
+ <!-- Add Disqus forum -->
+ {{ if .disqus.shortName }}
+ {{ partial "disqus.html" . }}
+ <!-- Add valine -->
+ {{ else if .valine }}
+ {{ partial "valine.html" . }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ <!-- Keep backward compatibility with old config.yaml -->
{{ if site.DisqusShortname }}
- {{ partial "disqus.html" . }}
+ {{ partial "disqus.html" . }}
{{ end }}
+
</div>
</div>
</div>