Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大白技术控
yanglr2010
提交
170fcb38
Y
yanglr2010
项目概览
大白技术控
/
yanglr2010
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yanglr2010
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
170fcb38
编写于
7月 15, 2019
作者:
EvanOne(文一)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Add valine comment
上级
7667e19d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
68 addition
and
7 deletion
+68
-7
_config.yml
_config.yml
+32
-3
layout/_components/comments.pug
layout/_components/comments.pug
+2
-0
layout/_third-party/comments/index.pug
layout/_third-party/comments/index.pug
+2
-0
layout/_third-party/comments/valine.pug
layout/_third-party/comments/valine.pug
+27
-0
source/css/_components/comments.styl
source/css/_components/comments.styl
+5
-4
未找到文件。
_config.yml
浏览文件 @
170fcb38
...
...
@@ -341,7 +341,7 @@ reward:
# ---------------------------------------------------------------
# Gitment
# See: https://github.com/imsun/gitment
# See: https://github.com/imsun/gitment
/
gitment
:
enable
:
false
# Github username.
...
...
@@ -356,7 +356,7 @@ gitment:
lazy
:
true
# Gittalk
# See: https://github.com/gitalk/gitalk
# See: https://github.com/gitalk/gitalk
/
gitalk
:
enable
:
false
# Github username.
...
...
@@ -377,6 +377,33 @@ gitalk:
# Available values: en, zh-CN, es-ES, fr, ru, zh-TW
language
:
# Valine
# See: https://valine.js.org/quickstart.html
valine
:
enable
:
false
# Your leancloud application appid.
appid
:
# Your leancloud application appkey.
appkey
:
# Mail notifier.
notify
:
true
# Verification code.
verify
:
true
# Comment box placeholder.
placeholder
:
Just go go
# Gravatar style.
avatar
:
mp
# Custom comment header.
meta
:
nick,mail,link
# Pagination size.
pageSize
:
10
# Article reading statistics.
visitor
:
false
# Whether to record the commenter IP.
recordIP
:
false
# language, available values: en, zh-cn.
language
:
# Livere
# See: https://www.livere.com/
livere
:
...
...
@@ -394,8 +421,10 @@ disqus:
# Statistics and Analytics config
# ---------------------------------------------------------------
# Busuanzi statistics
# See: https://busuanzi.ibruce.info/
busuanzi
:
enable
:
tru
e
enable
:
fals
e
site
:
# Only show by icon.
icon_only
:
false
...
...
layout/_components/comments.pug
浏览文件 @
170fcb38
...
...
@@ -15,3 +15,5 @@ else if theme.livere && theme.livere.enable
else if theme.disqus && theme.disqus.enable
div#comments.comments.main-content-layout
div#disqus_thread
else if theme.valine && theme.valine.enable
div#comments.comments.main-content-layout
layout/_third-party/comments/index.pug
浏览文件 @
170fcb38
...
...
@@ -7,3 +7,5 @@ if page.comments
include ./livere.pug
else if theme.disqus && theme.disqus.enable
include ./disqus.pug
else if theme.valine && theme.valine.enable
include ./valine.pug
layout/_third-party/comments/valine.pug
0 → 100644
浏览文件 @
170fcb38
script(src='https://cdn1.lncld.net/static/js/3.0.4/av-min.js')
script(src='https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js')
script.
window.onload = function() {
var GUEST_INFO = ['nick', 'mail', 'link'];
var guest_info = '!{ theme.valine.meta }';
guest_info = guest_info.split(',').filter(function(item) {
return GUEST_INFO.indexOf(item) > -1;
});
new Valine({
el: '#comments',
appId: '!{ theme.valine.appid }',
appKey: '!{ theme.valine.appkey }',
notify: !{ theme.valine.notify },
verify: !{ theme.valine.verify },
placeholder: '!{ theme.valine.placeholder }',
avatar: '!{ theme.valine.avatar }',
meta: guest_info,
pageSize: '!{ theme.valine.pageSize }' || 10,
visitor: !{ theme.valine.visitor },
recordIP: !{ theme.valine.recordIP },
lang: '!{ theme.valine.language }' || 'zh-cn'
});
};
source/css/_components/comments.styl
浏览文件 @
170fcb38
.comments
display: flex
margin: 1.5rem 0 0
flex-direction: column
a
text-decoration: none !important
...
...
@@ -8,7 +9,7 @@
// Gitment
#gitment-container
width: 100%
#gitment-button
margin: 0 auto
border-radius: 10px
...
...
@@ -23,15 +24,15 @@
background-color: $blue-light
a.gitment-editor-avatar
clearAStyle()
clearAStyle()
// Gitalk
#gitalk-container
width: 100%
& > :first-child
margin: 0 auto
// Livere
#lv-container
width: 100%
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录