All Projects → johnlui → Laraduoshuo

johnlui / Laraduoshuo

Licence: mit
Laravel 5 实现的私有评论系统,用于 Hexo、Jekyll 等静态博客系统

Projects that are alternatives of or similar to Laraduoshuo

Post Scheduler
Schedule posts & content updates for static websites (Jekyll, Hugo, Gatsby, Phenomic etc)
Stars: ✭ 184 (+100%)
Mutual labels:  jekyll, hexo
Awesome Static Hosting And Cms
A collection of awesome static hosting & CMS providers
Stars: ✭ 163 (+77.17%)
Mutual labels:  jekyll, hexo
notoma
Use Notion as your blogging editor, with any static gen blog engine. Notoma converts Notion pages to Markdown files.
Stars: ✭ 40 (-56.52%)
Mutual labels:  jekyll, hexo
Vanilla Back To Top
Simple and smooth Back To Top button
Stars: ✭ 179 (+94.57%)
Mutual labels:  jekyll, hexo
Awesome Docs With Static Site Generators
Pointers to all templates and implementations based on static site generators
Stars: ✭ 44 (-52.17%)
Mutual labels:  jekyll, hexo
Hexo Theme Even
🚀 A super concise theme for Hexo
Stars: ✭ 1,244 (+1252.17%)
Mutual labels:  hexo
Hexo Theme Webstack
A hexo theme based on webstack. | 一个基于webstack的hexo主题。
Stars: ✭ 86 (-6.52%)
Mutual labels:  hexo
Autm Rb
Jekyll theme
Stars: ✭ 80 (-13.04%)
Mutual labels:  jekyll
Heckle
✒️ Jekyll in Haskell (feat. LaTeX)
Stars: ✭ 80 (-13.04%)
Mutual labels:  jekyll
Brew.sh
🔖 The Homebrew homepage
Stars: ✭ 91 (-1.09%)
Mutual labels:  jekyll
Butane Jekyll Theme
Butane Jekyll Theme
Stars: ✭ 88 (-4.35%)
Mutual labels:  jekyll
Garth
🥁 A really basic theme for Jekyll
Stars: ✭ 85 (-7.61%)
Mutual labels:  jekyll
Hexo Client
Hexo 博客系统客户端
Stars: ✭ 82 (-10.87%)
Mutual labels:  hexo
Hexo Theme Believe
A simple theme for hexo Sample:
Stars: ✭ 86 (-6.52%)
Mutual labels:  hexo
Jekyll Docs Theme
A mediocre Jekyll theme for writing documentation websites based Bootstrap's old website design
Stars: ✭ 81 (-11.96%)
Mutual labels:  jekyll
Jekyll Cv Crafter
Jekyll based CV generator
Stars: ✭ 89 (-3.26%)
Mutual labels:  jekyll
Jekyll Seo Tag
A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
Stars: ✭ 1,226 (+1232.61%)
Mutual labels:  jekyll
Hexo Album
add album&photos with Hexo blog
Stars: ✭ 85 (-7.61%)
Mutual labels:  hexo
Opendefinition
Open Definition source
Stars: ✭ 87 (-5.43%)
Mutual labels:  jekyll
Jekyll Seo Gem
💎 🔎 A gem version of @bhardin's SEO Jekyll tool
Stars: ✭ 84 (-8.7%)
Mutual labels:  jekyll

LaraDuoshuo

多说将于 2017 年 6 月 1 号关闭,此为我即兴写的私有评论系统,初步设计用于 Hexo,下一步准备支持煎蛋那样的单页面多评论需求。

live demo

https://autolayout.club

特性

  • [ ] 多说数据导入功能
  • [ ] 新评论邮件通知,被回复邮件通知
  • [x] 基于简单 @ 的回复功能
  • [x] “审核后才显示”开关
  • [x] 域名白名单
  • [x] 基于 Akismet 的反垃圾评论
  • [x] 管理后台:评论审核、编辑
  • [x] 页面自注册
  • [x] 跨域部署,异步加载
  • [x] 移动兼容

环境要求

PHP > 5.6.4

图片们

原理图

原理图

截图

截图

如何激活附带的 demo

后端跑起来

生成 .env 文件和密钥:

git clone [email protected]:johnlui/LaraDuoshuo.git
cd LaraDuoshuo
composer update
sudo chmod -R 777 storage/ bootstrap/cache/
cp .env.example .env
php artisan key:generate
cd public
php -S 0.0.0.0:9000

然后将数据库配置修改为真实值,并将根目录下的 LaraDuoshuo.sql 导入数据库。

demo 跑起来

npm install hexo-cli -g
cd hexo-demo
hexo serve

如何用于 Hexo

后端

将代码部署到自己的服务器,指一个域名过去即可。

前端

Hexo 默认主题

themes/landscape/layout/_partial/article.ejs 第 36 行 </article> 的后面添加如下代码:

<% if (!index) { -%>
<link rel="stylesheet" href="//fuck.io:9000/css/static.css">
<div id="comments"></div>
<% } -%>

themes/landscape/layout/_partial/after-footer.ejs 第 17 行 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> 替换为:

<script src="//apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//fuck.io:9000/js/static.js"></script>
<script>
LaraDuoshuo.APP_KEY = 'base64:nMYxR20sgL9zbiRrMS8GekiVzPSLBId9QAoTepx+nuk=';
LaraDuoshuo.BaseURL = 'http://fuck.io:9000';
</script>

请将上面的 LaraDuoshuo.APP_KEY 的值替换为你服务端 .env 中的 APP_KEY 的值。

著名的 NexT 主题

themes/next/layout/_layout.swig{% if page.comments %} 这一行的下面增加:

<link rel="stylesheet" href="//fuck.io:9000/css/static.css">
<div id="comments"></div>

<script type="text/javascript" src="//cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script> 这一行的下面增加:

<script src="//fuck.io:9000/js/static.js"></script>
<script>
LaraDuoshuo.APP_KEY = 'base64:nMYxR20sgL9zbiRrMS8GekiVzPSLBId9QAoTepx+nuk=';
LaraDuoshuo.BaseURL = 'http://fuck.io:9000';
</script>

同样,请将上面的 LaraDuoshuo.APP_KEY 的值替换为你服务端 .env 中的 APP_KEY 的值。

替换域名

别忘了将上文中的 fuck.io:9000 替换为你真实的域名端口。

如何用于自己的静态页面

代码如下:

<link rel="stylesheet" href="//fuck.io:9000/css/static.css"> // 默认样式
<div id="comments"></div> // 评论 DOM 锚点

<script src="//apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//fuck.io:9000/js/static.js"></script> // 此 js 必须在 jQuery 之后引入,否则会被覆盖
<script> // 注入基础参数
LaraDuoshuo.APP_KEY = 'base64:nMYxR20sgL9zbiRrMS8GekiVzPSLBId9QAoTepx+nuk=';
LaraDuoshuo.BaseURL = 'http://fuck.io:9000';
</script>

其他配置

域名白名单

修改 config/app.php 内的 domain_white_list 字段,将允许使用本系统的域名加入进去即可。注意那里还有一个开关,默认是不验证的呦。

Akismet 反垃圾评论

https://akismet.com 注册一个账户,得到一个“AKISMET API KEY”,配置到 config/app.php 内的 AKISMET_API_KEY 字段,就 OK 啦!

管理后台

访问 /register 注册一个账号,成功之后将 config/app.php 内的 register_enable 字段改为 false 关闭注册。

之后就可以使用简洁高效的管理后台啦~

审核通过才显示

此配置位于 config/app.php 内,名为 force_show_after_check,默认为打开状态。

开源协议

本项目遵循 MIT 协议开源,具体请查看根目录下的 LICENSE 文件。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].