mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
添加Vssue评论插件
This commit is contained in:
parent
7dab67b358
commit
ea38ece507
@ -60,6 +60,13 @@ params:
|
|||||||
site:
|
site:
|
||||||
locale:
|
locale:
|
||||||
|
|
||||||
|
vssue:
|
||||||
|
platform:
|
||||||
|
owner:
|
||||||
|
repo:
|
||||||
|
clientId:
|
||||||
|
clientSecret:
|
||||||
|
|
||||||
widgets:
|
widgets:
|
||||||
enabled:
|
enabled:
|
||||||
- search
|
- search
|
||||||
|
26
layouts/partials/comments/provider/vssue.html
Normal file
26
layouts/partials/comments/provider/vssue.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{{- 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: {
|
||||||
|
owner: "{{ .owner }}",
|
||||||
|
repo: "{{ .repo }}",
|
||||||
|
clientId: "{{ .clientId }}",
|
||||||
|
clientSecret: "{{ .clientSecret }}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
Loading…
Reference in New Issue
Block a user