ghost API介绍

本文档详细介绍了如何使用 Ghost 的 API 客户端进行内容管理和网站配置。包括了如何安装和使用内容 API 与管理 API,以及提供了一些实用的工具函数,如标签管理和 URL 格式化。此外,还提供了示例代码展示如何调用 API 接口获取文章列表。

API Client

// https://ghost.org/docs/api/v3/javascript/content/
// https://ghost.org/docs/api/v3/javascript/admin/

yarn add @tryghost/content-api
yarn add @tryghost/admin-api

 

Tools

yarn add @tryghost/helpers
yarn add @tryghost/string

const {tags, readingTime} = require('@tryghost/helpers');
const {slugify} = require('@tryghost/string');

const slug = slugify('你好 👋!'); // slug === "ni-hao"

 

API

// https://ghost.org/docs/api/v3/content/#endpoints
// https://ghost.org/docs/api/v3/admin/#endpoints

https://demo.ghost.io/ghost/api/v3/content/posts/?key=22444f78447824223cefc48062&include=tags,authors

 

官方文档中的小疏漏

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值