Skip to content

Commit

Permalink
Merge pull request #473 from MiniValine/develop
Browse files Browse the repository at this point in the history
MiniValine2.7.0更新配置
  • Loading branch information
blinkfox authored Jun 7, 2020
2 parents 3c3a264 + 38cd801 commit 5fbf934
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 17 deletions.
33 changes: 30 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,19 +319,46 @@ valine:
# The configuration of the MiniValine comment module is not activated by default.
# To use it, activate the configuration item and set appId and appKey.
# MiniValine 评论模块的配置,默认为不激活,如要使用,就请激活该配置项,并设置 appId 和 appKey.
# See: https://github.com/MiniValine/MiniValine
minivaline:
enable: false
appId: # Your leancloud application appid
appKey: # Your leancloud application appkey
appId: zhM0AOiqle17oPoE84CoYw1e-gzGzoHsz # Your leancloud application appid
appKey: itmzT1JbXfAjVwMqDhGPzU45 # Your leancloud application appkey
mode: DesertsP # DesertsP or xCss
placeholder: Write a Comment # Comment box placeholder
adminEmailMd5: # The MD5 of Admin Email to show Admin Flag.
math: true # Support MathJax.
md: true # Support Markdown.
enableQQ: false # Enable QQ avatar API.
NoRecordIP: false # Do not record commenter IP.
visitor: true # Article reading statistics.
maxNest: 6 # Sub-comment maximum nesting depth.
pageSize: 6 # Pagination size.
adminEmailMd5: de8a7aa53d07e6b6bceb45c64027763d # The MD5 of Admin Email to show Admin Flag.[Just Only DesertsP Style mode]
tagMeta: # The String Array of Words to show Flag.[Just Only xCss Style mode]
- 管理员
- 小伙伴
- 访客
master: # The MD5 String Array of master Email to show master Flag.[Just Only xCss Style mode]
- de8a7aa53d07e6b6bceb45c64027763d
friends: # The MD5 String Array of friends Email to show friends Flag.[Just Only xCss Style mode]
- b5bd5d836c7a0091aa8473e79ed4c25e
- adb7d1cd192658a55c0ad22a3309cecf
- 3ce1e6c77b4910f1871106cb30dc62b0
- cfce8dc43725cc14ffcd9fb4892d5bfc
# MiniValine's display language depends on user's browser or system environment
# If you want everyone visiting your site to see a uniform language, you can set a force language value
# Available values: en | zh-CN | (and many more)
# More i18n info: https://github.com/MiniValine/minivaline-i18n
lang:
# Expression Url.
# https://github.com/MiniValine/MiniValine/blob/master/.github/FAQ.md#how-to-customize-emoticons
emoticonUrl:
- https://cdn.jsdelivr.net/npm/alus@latest
- https://cdn.jsdelivr.net/gh/MiniValine/qq@latest
- https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@latest
- https://cdn.jsdelivr.net/gh/MiniValine/tieba@latest
- https://cdn.jsdelivr.net/gh/MiniValine/twemoji@latest
- https://cdn.jsdelivr.net/gh/MiniValine/weibo@latest

# Whether to display fork me on github icon and link, default true, You can change it to your repo address
# 配置是否在 header 中显示 fork me on github 的图标,默认为true,你可以修改为你的仓库地址.
Expand Down
40 changes: 26 additions & 14 deletions layout/_partial/minivaline.ejs
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
<style>
.valine-card {
.mvaline-card {
margin: 1.5rem auto;
}
.valine-card .card-content {
.mvaline-card .card-content {
padding: 20px 20px 5px 20px;
}
</style>

<div class="card valine-card" data-aos="fade-up">
<div class="card mvaline-card" data-aos="fade-up">
<div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; padding-left: 20px; top: 15px; padding-bottom: 5px;">
<i class="fas fa-comments fa-fw" aria-hidden="true"></i>
<span>评论</span>
</div>
<div id="vcomments" class="card-content" style="display: grid">
<div id="mvcomments" class="card-content" style="display: grid">
</div>
</div>

<script src="<%- theme.jsDelivr.url %><%- url_for(theme.libs.js.minivaline) %>"></script>
<script>
new MiniValine({
el: '#vcomments',
appId: '<%- theme.minivaline.appId %>',
appKey: '<%- theme.minivaline.appKey %>',
placeholder: '<%= theme.minivaline.placeholder %>',
lang: '<%= theme.minivaline.lang %>',
adminEmailMd5: '<%= theme.minivaline.adminEmailMd5 %>',
math: <%= theme.minivaline.math %>,
md: <%= theme.minivaline.md %>,
});
new MiniValine({
el: '#mvcomments',
appId: '<%- theme.minivaline.appId %>',
appKey: '<%- theme.minivaline.appKey %>',
mode: '<%- theme.minivaline.mode %>',
placeholder: '<%- theme.minivaline.placeholder %>',
pathname: window.location.pathname,
lang: '<%- theme.minivaline.lang %>',
adminEmailMd5: '<%- theme.minivaline.adminEmailMd5 %>',
tagMeta: <%- '["' + theme.minivaline.tagMeta.join('", "') + '"]' %>,
master: <%- '["' + theme.minivaline.master.join('", "') + '"]' %>,
friends: <%- '["' + theme.minivaline.friends.join('", "') + '"]' %>,
math: <%- theme.minivaline.math %>,
md: <%- theme.minivaline.md %>,
enableQQ: <%- theme.minivaline.enableQQ %>,
NoRecordIP: <%- theme.minivaline.NoRecordIP %>,
visitor: <%- theme.minivaline.visitor %>,
maxNest: <%- theme.minivaline.maxNest %>,
pageSize: <%- theme.minivaline.pageSize %>,
serverURLs: '<%- theme.minivaline.serverURLs %>',
emoticonUrl: <%- '["' + theme.minivaline.emoticonUrl.join('", "') + '"]' %>,
});
</script>

0 comments on commit 5fbf934

Please sign in to comment.