介绍
Cabloy-CMS 是什么
Cabloy-CMS 是基于 CabloyJS 全栈业务开发框架开发的 "动静结合" 的 CMS, 可以快速构建企业网站, 博客, 社区, 商城等 web 应用.
在线演示
http://zhennann.me/
特性
Cabloy-CMS 受 Hexo 启发, 采用 "静态 + 动态" 的架构, 弥补了 Hexo 许多功能上的不足, 主要特性如下:
内置多站点, 多语言支持
不同语言可单独设置主题
内置 SEO 优化, 自动生成 Sitemap 文件
文章在线撰写, 发布
文章发布时实时渲染静态页面, 不必整站输出, 提升整体性能
内置文章查看计数器
内置评论系统
内置全文检索
文章可添加附件
自动合并并最小化 CSS 和 JS
JS 支持 ES6 语法, 并在合并时自动 babel 编译
首页图片延迟加载, 自动匹配设备像素比
调试便捷
架构 - 动静结合
动态部分
Cabloy-CMS 基于 CabloyJS 全栈业务开发框架, 提供了强大的文章后台管理系统. CMS 当中经常变动的功能均通过 "动态部分" 实现, 并提供 API 供 "静态部分" 调用.
静态部分
Cabloy-CMS 将 "首页" 和 "文章" 等静态元素实时渲染成静态文件, 既满足了 SEO 的需求, 同时也提升了访问性能.
此外,"静态部分" 通过 Ajax 访问 "动态部分" 提供的 API, 可实现丰富的页面功能.
快速开始
安装 EggBorn
$ NPM install -g egg-born
- $ egg-born cabloy-cms --type=cabloy
- $ cd cabloy-cms
- $ NPM i
- src/backend/config/config.unittest.JS
- // MySQL
- config.MySQL = {
- clients: {
- // donnot change the name
- __ebdb: {
- host: '127.0.0.1',
- port: '3306',
- user: 'root',
- password: '',
- database: 'sys', // donnot change the name
- },
- },
- };
- src/backend/config/config.local.JS
- // MySQL
- config.MySQL = {
- clients: {
- // donnot change the name
- __ebdb: {
- host: '127.0.0.1',
- port: '3306',
- user: 'root',
- password: '',
- database: 'sys', // recommended
- },
- },
- };
- src/backend/config/config.prod.JS
- // MySQL
- config.MySQL = {
- clients: {
- // donnot change the name
- __ebdb: {
- host: '127.0.0.1',
- port: '3306',
- user: 'root',
- password: '',
- database: '{{name}}',
- },
- },
- };
- {
- "host": {
- "url": "http://example.com",
- "rootPath": ""
- },
- "language": {
- "default": "zh-cn",
- "items": "zh-cn,en-us"
- },
- "themes": {
- "zh-cn": "cms-themeblog",
- "en-us": "cms-themeblog"
- },
- "plugins": {
- "cms-plugintrack": {
- "track": {
- "google": "",
- "baidu": "",
- "qq": ""
- }
- }
- }
- }
- host
- plugins
- cms-plugintrack
- track
- ![5775337-414d62d7c1e152f2](http://zhennann.cabloy.org/api/a/file/file/download/00ca2e89235b47bba5b7e7580fc71834.jpg)
- ## 一天到晚的鱼儿不停游
- here and there
- here and there
- here and there
- here and there
- here and there
- here and there
- // instances
- config.instances = [
- { subdomain: 'admin', password: '', title:'',
- meta: {
- JSONP: { whiteList: 'example.com' },
- },
- },
- ];
- // backend
- const backend = {
- port: 7002,
- hostname: '127.0.0.1',
- };
- server {
- listen 80;
- server_name admin.example.com;
- set $node_port 7002;
- root /Users/wind/Documents/temp/cabloy-cms/dist;
- location /public {
- root /Users/wind/cabloy/cabloy-cms;
- internal;
- }
- location /API/ {
- proxy_http_version 1.1;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_set_header X-NginX-Proxy true;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_pass http://127.0.0.1:$node_port$request_uri;
- proxy_redirect off;
- }
- }
- server {
- listen 80;
- server_name example.com;
- root /Users/wind/cabloy/cabloy-cms/public/1/cms/dist;
- }
来源: http://www.bubuko.com/infodetail-2806786.html