换用valine评论

This commit is contained in:
结发受长生
2018-06-28 17:16:52 +08:00
parent 04142bf5b4
commit 9e44b10581
19 changed files with 404 additions and 64 deletions
@@ -0,0 +1,25 @@
{
"gitalk": {
"enable": false,
"config": {
"ClientID": "90e8f648da2a669f7975",
"ClientSecret": "7d2b602616387748ef0df10f7a8a626bdfd1034c",
"repo": "hexo_blog",
"githubID": "sookie2010",
"adminUser": "sookie2010",
"distractionFreeMode": false
}
},
"valine": {
"enable": true,
"config": {
"el": "#comments",
"notify": false,
"verify": false,
"appId": "40jq6uO51rpVT4PEEcayYkda-gzGzoHsz",
"appKey": "nBOoOEDP4EBUfgpSJAF6idKi",
"placeholder": "ヾノ≧∀≦)o来啊,快活啊!",
"avatar": "mm"
}
}
}
+16
View File
@@ -0,0 +1,16 @@
// const AV = require('leancloud-storage');
window.AV = require('leancloud-storage');
const Valine = require('../lib/Valine.min');
/**
* Valine.min.js.bak文件, 是根据Valine项目源代码重新打包的
* 可以支持对于AV对象的传参输入, 而不需要暴露全局变量
* 但是缺少一些新功能
*/
// 评论配置
const commentConfig = require("../config/comment.json");
if(window.yiliaConfig.isPost && commentConfig.valine.enable) {
commentConfig.valine.config.path = window.location.pathname;
// commentConfig.valine.config.av = AV;
new Valine(commentConfig.valine.config);
}
+1 -1
View File
@@ -4,7 +4,7 @@ import Anm from './anm'
import Browser from './browser'
import axios from 'axios'
import Vue from './vue.min'
import Vue from '../lib/vue/vue.min'
const isMobile = (Browser.versions.mobile && window.screen.width < 800)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long