feat: add Vssue comment (#197)

* 添加Vssue评论插件

* 修复默认代理过期问题

* style(comment/vssue): format html

Co-authored-by: Jimmy Cai <github@jimmycai.com>
This commit is contained in:
慕枫Go 2021-04-27 00:27:44 +08:00 committed by GitHub
parent 7dab67b358
commit 325303a7f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -60,6 +60,13 @@ params:
site:
locale:
vssue:
platform:
owner:
repo:
clientId:
clientSecret:
widgets:
enabled:
- search

View File

@ -0,0 +1,27 @@
{{- with .Site.Params.comments.vssue -}}
<link rel="stylesheet" href="https://unpkg.com/vssue/dist/vssue.min.css" />
<div id="vssue"></div>
<script src="https://unpkg.com/vue/dist/vue.runtime.min.js"></script>
<script src="https://unpkg.com/vssue/dist/vssue.{{ .platform }}.min.js"></script>
<script>
new Vue({
el: "#vssue",
render: (h) =>
h("Vssue", {
props: {
title: "{{ $.Title }}",
options: {
proxy: (url) => "https://cors-anywhere.azm.workers.dev/" + url,
owner: "{{ .owner }}",
repo: "{{ .repo }}",
clientId: "{{ .clientId }}",
clientSecret: "{{ .clientSecret }}",
},
},
}),
});
</script>
{{- end -}}