hexo-blog-like
v3.0.0
Published
A simple and easy-to-use free blog like plugin.
Downloads
23
Readme
部署教程
下面开始部署教程,你可以使用Cloudflare或leancloud储存点赞数据
使用Cloudflare储存点赞数据后端一键部署:
使用leancloud储存点赞数据需要提前注册好leancloud账号,只需要邮箱即可注册,无需绑定信用卡之类的,注册即用(中国大陆版要备案)。
npm一键部署
适用于Hexo框架,其他框架我没用过
在博客根目录粘贴以下命令一键安装
npm install hexo-blog-like --save安装好后在博客根目录的_config.yml添加以下配置项:
Blog-Like:
enable: true #是否启用插件
Backend: Cloudflare # 或者 Leancloud | Cloudflare | PHP,默认Cloudflare
CloudflareBackend: #你的Cloudflare后端地址
PHPBackend: #自部署PHP后端地址
AppID: #如果你使用Leancloud,记得填你的Leancloud ID和KEY
AppKEY: #你的KEY
xianzhi: true #是否限制点赞数,默认开启
number: 5 #如果限制点赞数,限制的点赞数,默认为5个赞
GoogleAnalytics: true #是否向谷歌分析发送点赞事件,默认关闭
GAEventCategory: Engagement #点赞事件类别,默认Engagement
GAEventAction: Like #事件名称,默认Like完事后hexo clean && hexo g && hexo s启动博客,在你想要的位置插入如下代码块,打开博客瞅瞅效果吧!
<div id="zan" class="clearfix">
<div class="heart" onclick="goodplus(url, flag)"></div>
<br>
<div id="zan_text"></div>
</div>对你有帮助的话给我个Starred吧!
https://github.com/2010HCY/Blog-Like
