feat: add Vssue comment (#197)
* 添加Vssue评论插件 * 修复默认代理过期问题 * style(comment/vssue): format html Co-authored-by: Jimmy Cai <github@jimmycai.com>
This commit is contained in:
parent
7dab67b358
commit
325303a7f8
@ -60,6 +60,13 @@ params:
|
||||
site:
|
||||
locale:
|
||||
|
||||
vssue:
|
||||
platform:
|
||||
owner:
|
||||
repo:
|
||||
clientId:
|
||||
clientSecret:
|
||||
|
||||
widgets:
|
||||
enabled:
|
||||
- search
|
||||
|
27
layouts/partials/comments/provider/vssue.html
Normal file
27
layouts/partials/comments/provider/vssue.html
Normal 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 -}}
|
Loading…
Reference in New Issue
Block a user