本项目魔改自 MiniValine 去掉一些花里胡哨的功能,又加了另外一些花里胡哨的功能。
MiniValine is a simple and minimalist comment system based on Leancloud
本项目主要用在 Hexo Theme Shoka >= 0.2 中,是该主题暂时、唯一支持的评论功能。
如果想用在其他地方,需要自行修改,比如加上css等。
本文档仅提供基本的配置参数说明。
0.1.*升级到此版本,需要手动进行一些迁移,以防止泄露用户邮箱、IP等隐私信息。
具体步骤戳此
全新安装无视此步。
Get App ID/App Key from LeanCloud
Click here to register or login in LeanCloud.
Click here Create new application in LeanCloud, and you will get appId/appKey.
valine:
appId: #Your_appId
appKey: #Your_appkey
placeholder: ヽ(○´∀`)ノ♪ # Comment box placeholder
avatar: mp # Gravatar style : mp, identicon, monsterid, wavatar, robohash, retro
pageSize: 10 # Pagination size
lang: zh-CN
visitor: true # Article reading statistic
NoRecordIP: false # Whether to record the commenter IP
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
tagMeta:
- 主人
- 小伙伴
- 新朋友
master:
# - hash of master@email.com
# - hash of master2@email.com
friends:
# - hash of friend@email.com
# - hash of friend2@email.com
powerMode: true-
el
StringRequired. [object HTMLDivElement]
-
appId
StringRequired. Your App ID
-
appKey
StringRequired. Your App Key
-
placeholder
StringInput Placeholder
-
pathname
StringDefault:
location.pathnameThe pathname of the page.
-
math
BooleanDefault:
trueOptions:
falseClose MathJax.trueSupport MathJax@3 initialization.
The above is the initialization operation of integrating MathJax in MiniValine. If MathJax is loaded on the page, MiniValine will use the MathJax version on the page.
-
md
BooleanDefault:
trueSupport Markdown.
-
lang
StringDefault:
navigator.language || navigator.userLanguage.Localization language key, en and zh-CN are currently available.
More i18n info: minivaline-i18n
-
emoticonUrl
String ArrayDefault:
['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']Expression Url.
-
NoRecordIP
BooleanDefault:
falseDo not record commenter IP.
-
pageSize
NumberDefault:
6Pagination size.
-
visitor
BooleanDefault:
trueOnly
article reading access statisticsandwhole site access statisticsare provided. -
serverURLs
StringDefault:
http[s]://[tab/us].avoscloud.comThis configuration is suitable for domestic custom domain name users, the overseas version will be automatically detected (no need to fill in manually).
Try to use cloudflare workers edge computing to improve the security
-
role
StringDefault:
adminWrite permissions for the administrator role.
-
powerMode
BooleanDefault:
trueTurn on activate-power-mode
-
closeFlag
BooleanDefault:
falseTurn off visitor flag.
If
cloudflagis turned on, the setting ofVisitor Flag Local Optionsis invalid. -
master
String ArrayDefault:
[]The MD5 String Array of master Email to show master Flag.
-
friends
String ArrayDefault:
[]The MD5 String Array of friends Email to show friends Flag.
-
tagMeta
String ArrayDefault:
[]The String Array of Words to show Flag (only three).
For Example:
tagMeta: ["Master", "Friend", "Visitor"] -
closeUA
BooleanDefault:
falseTurn off UA detection.
