开源博客哪家强?Ghost 一定值得一试。Ghost 已经算得上是老牌开源博客系统,如今发布的 Ghost 3 更是其史上包含最多更新内容的版本。Ghost 3 拥有更漂亮的前端设计和易用的后台管理系统,并支持使用 Github Actions 连续部署主题和管理付费订阅内容。如果你需要搭建个人博客或者是付费内容发布系统,那么 Ghost 一定是最值得考虑的选择
wget https://npm.taobao.org/mirrors/node/latest-v14.x/node-v14.1.0-linux-x64.tar.gz
wget https://github.com/TryGhost/Ghost/releases/download/3.41.1/Ghost-3.41.1.zip
https://www.ghostchina.com/
https://github.com/TryGhost/Ghost/releases
npm install ghost-cli -g (这不不操作,使用的源码运行)
修改端口
打开默认的 config.development.json
配置如下
接下来,修改配置文件中默认端口 port
为 8080
,原因是线上环境仅支持 8080 端口访问。然后修改 host
为公网可访问的 0.0.0.0
。实际上,在真正部署时无需修改默认配置,当然这里也学会了修改自定义配置的方法
npm start
Ghost 快捷手册
安装/设置
最新版本 | 下载 |
安装指令 | npm install --production |
启动 Ghost | npm start |
停止 Ghost | Ctrl+C |
文件路径
配置文件 | /config.js |
主题 | /content/themes |
插件 | /content/apps |
图片 | /content/images |
导航(默认) | /core/server/helpers/tpl/navigation.hbs |
分页(默认) | core/server/helpers/tpl/pagination.hbs |
MarkDown/快捷键
Save | - | Ctrl + S |
Bold | **text** | Ctrl / Cmd + B |
Emphasize | __text__ | Ctrl / Cmd + I |
Inline Code | `code` | Cmd + K / Ctrl + Shift + K |
Link | [title](http://) | Ctrl + Shift + L |
Image | ![alt](http://) | Ctrl + Shift + I |
List | * item | Ctrl + L |
H1 | # Heading | Ctrl + Alt + 1 |
H2 | ## Heading | Ctrl + Alt + 2 |
H3 | ### Heading | Ctrl + Alt + 3 |
Select Word | Ctrl + Alt + W | |
Uppercase | - | Ctrl + U |
Lowercase | - | Ctrl + Shift + U |
Titlecase | - | Ctrl + Alt + Shift + U |
Insert Current Date | - | Ctrl + Shift + 1 |