Add commento.io support

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2022-03-19 19:47:55 +06:00
parent 3809d298ca
commit 6bd5af5f11
10 changed files with 107 additions and 94 deletions

View file

@ -157,26 +157,13 @@
<hr />
<!----- 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" . }}
<!-- Add utteranc -->
{{ else if .utteranc }}
{{ partial "utteranc.html" . }}
<!-- Add giscus -->
{{ else if .giscus }}
{{ partial "giscus.html" . }}
{{ end }}
{{ end }}
{{ if site.Params.features.comment.enable }}
{{ partial "comments.html" site.Params.features.comment }}
{{ end }}
<!-- Keep backward compatibility with old config.yaml -->
{{ if site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") site.DisqusShortname) }}
{{ end }}
</div>