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

@ -0,0 +1,17 @@
<!-- valine -->
<div id="vcomments"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script type="text/javascript">
new Valine({
el: "#vcomments",
appId: "{{ .valine.appId }}",
appKey: "{{ .valine.appKey }}",
avatar: "{{ .valine.avatar }}",
placeholder: "{{ .valine.placeholder }}",
visitor: "{{ .valine.visitor }}",
lang: "{{ .valine.lang }}",
recordIP: "{{ .valine.recordIP }}",
enableQQ: "{{ .valine.enableQQ }}",
});
</script>