Commit 539964d3 authored by Ricardo Avila's avatar Ricardo Avila
Browse files

Add custom vssue commenting system

parent 797729bd
......@@ -67,8 +67,7 @@ sharing:
# Comments
comments:
provider: false # false (default), "disqus", "gitalk", "valine", "custom"
provider: vssue # false (default), "disqus", "gitalk", "valine", "vssue", "custom"
# Disqus
disqus:
shortname: # the Disqus shortname for the site
......@@ -86,7 +85,12 @@ comments:
app_key : # LeanCloud App key
placeholder : # Prompt information
visitor : # false (default)
meta : # "[nick, mail, link]" (default) nickname, E-mail, Personal-site
meta : # "[nick, mail, link]" (default) nickname, E-mail, Personal-sit
vssue:
clientID : 3261377138a7dd35c1be
clientSecret: a08616b5efcc0c93f123f96b8f3fe4fd81c59cc0
repository : vssue.ravilabio.info
owner : ravila4
# Pageview
......@@ -163,6 +167,7 @@ defaults:
layout: article
sharing: false
license: false
comment: true
aside:
toc: true
show_edit_on_github: true
......
......@@ -62,6 +62,10 @@ sources:
valine: 'https//unpkg.com/valine/dist/Valine.min.js'
mathjax: 'https://unpkg.com/mathjax@2.7.4/unpacked/MathJax.js?config=TeX-MML-AM_CHTML'
mermaid: 'https://unpkg.com/mermaid@8.0.0-rc.8/dist/mermaid.min.js'
vssue:
js: 'https://unpkg.com/vssue@1.4.6/dist/vssue.github-v4.min.js'
css: '/assets/css/vssue.min.css'
vue: 'https://unpkg.com/vue/dist/vue.runtime.min.js'
local:
font_awesome: '/assets/css/all.css'
jquery: '/assets/js/jquery.min.js'
......@@ -73,3 +77,7 @@ sources:
valine: '/assets/js/Valine.min.js'
mathjax: '/assets/js/MathJax.js'
mermaid: '/assets/js/mermaid.min.js'
vssue:
js: '/assets/js/vssue.github-v4.min.js'
css: '/assets/css/vssue.min.css'
vue: '/assets/js/vue.runtime.min.js'
{%- if site.comments.vssue.clientID and
site.comments.vssue.clientSecret and
site.comments.vssue.repository and
site.comments.vssue.owner -%}
{%- include snippets/get-sources.html -%}
{%- assign _sources = __return -%}
<div id="vssue"></div>
<script src='{{ _sources.vue }}'></script>
<script src='{{ _sources.vssue.js }}'></script>
<script>
window.Lazyload.css('{{ _sources.vssue.css }}');
new Vue({
el: '#vssue',
render: h => h('Vssue', {
props: {
title: '{{ page.title }}',
options: {
owner: '{{ site.comments.vssue.owner }}',
repo: '{{ site.comments.vssue.repository }}',
clientId: '{{ site.comments.vssue.clientID }}',
clientSecret: '{{ site.comments.vssue.clientSecret }}',
},
}
})
})
</script>
{%- endif -%}
......@@ -5,6 +5,8 @@
{%- include comments-providers/gitalk.html -%}
{%- elsif site.comments.provider == 'valine' -%}
{%- include comments-providers/valine.html -%}
{%- elsif site.comments.provider == 'vssue' -%}
{%- include comments-providers/vssue.html -%}
{%- elsif site.comments.provider == 'custom' -%}
{%- include comments-providers/custom.html -%}
{%- endif -%}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment