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>
This commit is contained in:
Emily 2021-10-28 23:11:25 +08:00 committed by GitHub
parent ff86f78b4d
commit 098179ec1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 4 deletions

View file

@ -155,10 +155,24 @@
<hr />
{{ partial "navigators/next-prev-navigator.html" . }}
<hr />
<!-- Add Disqus forum -->
{{ if site.DisqusShortname }}
{{ partial "disqus.html" . }}
<!----- 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" . }}
{{ end }}
</div>
</div>
</div>