{{title}}
{{content}}
Ghost是一个强大的开源发布平台,专为现代内容创作者设计,提供从内容创作到商业变现的完整解决方案
现代化的功能设计,满足专业发布者的所有需求
专业级内容创作工具,支持富媒体内容、动态卡片、图片画廊等多种内容形式,让创作变得简单而强大。
集成邮件订阅系统,支持邮件通讯发送、用户分组、个性化内容推送,轻松建立与读者的直接联系。
完整的会员管理功能,支持免费和付费订阅、多层级会员权限、收入分析,助力内容变现。
丰富的主题市场和强大的自定义功能,基于Handlebars模板引擎,轻松打造独特的品牌形象。
基于现代Web技术栈构建的高性能发布平台
高性能JavaScript运行时
轻量级Web应用框架
可靠的数据存储方案
强大的管理界面框架
灵活的模板引擎
响应式设计和动画
多种安装方式,选择最适合你的部署方案
npm install ghost-cli -g
ghost install local
ghost install
生产环境安装会自动配置SSL证书和系统服务
version: '3.1'
services:
ghost:
image: ghost:5-alpine
restart: always
ports:
- 2368:2368
environment:
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: example
database__connection__database: ghost
url: http://localhost:2368
volumes:
- ghost-content:/var/lib/ghost/content
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
volumes:
- ghost-db:/var/lib/mysql
volumes:
ghost-content:
ghost-db:
docker-compose up -d
git clone https://github.com/TryGhost/Ghost.git
cd Ghost
yarn setup
yarn dev
快速了解Ghost的核心功能和使用方法
// 使用Ghost Content API创建文章
const GhostContentAPI = require('@tryghost/content-api');
const api = new GhostContentAPI({
url: 'https://your-ghost-site.com',
key: 'your-content-api-key',
version: 'v5.0'
});
// 获取所有文章
api.posts.browse({
limit: 5,
include: 'tags,authors'
}).then((posts) => {
posts.forEach((post) => {
console.log(post.title);
});
}).catch((err) => {
console.error(err);
});
{{!-- Ghost主题模板示例 --}}
{{#post}}
{{title}}
{{content}}
{{/post}}
加入活跃的Ghost社区,获取帮助和分享经验