打开博客目录的next主题配置文件 _config.yml ,找到Valine,将上图的APP ID 和APP Key复制到对应位置。
theme/next/_config.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
valine: enable:true appid:XXXXXXX-MdYXbMMI# Your leancloud application appid appkey:XXXXXXXXX# Your leancloud application appkey notify:false# Mail notifier verify:false# Verification code placeholder:Writesomethingtome...# Comment box placeholder avatar:retro# Gravatar style guest_info:nick,mail,link# Custom comment header pageSize:10# Pagination size language:zh-cn# Language, available values: en, zh-cn visitor:false# Article reading statistic comment_count:true# If false, comment count will only be displayed in post page, not in home page recordIP: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) #post_meta_order: 0
leancloud_visitors: enable:true app_id:xXXXXXXXxx# <your app id> app_key:xxxxxxx# <your app key> # Required for apps from CN region server_url:# <your server url> # Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security # If you don't care about security in leancloud counter and just want to use it directly # (without hexo-leancloud-counter-security plugin), set `security` to `false`. security:true
# Local search # Dependencies: https://github.com/theme-next/hexo-generator-searchdb local_search: enable:true # if auto, trigger search by changing input # if manual, trigger search by pressing enter key or search button trigger:auto # show top n results per article, show all results by setting to -1 top_n_per_article:1 # unescape html strings to the readable one unescape:false