Skip to content

A collection of TypeScript packages and tools to interact with a ghost blog. Type-safe ๐Ÿฆพ Ghost Content API client and CLI ๐Ÿค– tool to export posts in Markdown.

License

Notifications You must be signed in to change notification settings

allencheng443/ts-ghost

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation



Logo

ts-ghost

@ts-ghost is a collection of tools written in TypeScript to interract with a Ghost Blog. Strongly ๐Ÿฆพ typed Content-Api, Cli tools, and more coming!

Documentation โ€“ Twitter

License GitHub top language

About The Project

Ghost is an amazing open source blogging platform. Beautiful CMS and good API but there is lack of strongly types TypeScript libraries to interact with its API. This is where the ts-ghost suite comes in.

Here you will find links to the different packages of the ts-ghost suite.

An elegant cli ๐Ÿค– to interact with your Ghost Blog directly via the Ghost Content API or Admin API and export posts in Markdown format. From the cli you will be able to:

npx @ts-ghost/ghost-blog-buster

or

npm install -g @ts-ghost/ghost-blog-buster
  • ๐ŸŒช๏ธ Choose between Content API or Admin API (for members or blog post content behind subscribption)
  • ๐Ÿ“š Export specific or all blog Posts in Markdown format to the folder of your choice.
  • โš™๏ธ Display or export to JSON your Tags, Tiers, Authors, Members (Admin API only)
  • ๐Ÿ“ถ Connect / Disconnect from the Blog
  • Documentation โ€” GitHub โ€” npm

A strongly ๐Ÿฆพ typed TypeScript library to interact with the Ghost Content API:

npm install @ts-ghost/content-api
  • Browse and Read your blog Posts, Pages, Tags, Tiers, Authors and Settings
  • Type-safe Inputs/Outputs.
  • Models schema and run-type safety with Zod.
  • Documentation โ€” GitHub โ€” npm

A strongly ๐Ÿฆพ typed TypeScript library to interact with the Ghost Admin API:

npm install @ts-ghost/admin-api
  • Browse/Read/Add/Edit/Delete your blog Posts, Pages, Members, Tags, Tiers, Offers, Newsletters, Users, webhooks, Site, ...
  • Type-safe Inputs/Outputs for all CRUD methods.
  • Models schema and run-type safety with Zod.
  • Documentation โ€” GitHub โ€” npm

The base building block containing the APIComposer and Fetchers (Browse / Read / Mutations) accepting Zod Schemas.

npm install @ts-ghost/core-api
  • Input type-safety of the Ghost API params
  • Modify Type Output based on Input params
  • Documentation โ€” GitHub โ€” npm

Roadmap

  • Ghost Admin API integration
  • Better handling of weird Ghost "include" params in API call

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.
  • Please also read through the Code Of Conduct before posting your first idea as well.

License

Distributed under the MIT License. See LICENSE for more information.

Authors

Acknowledgements

  • Ghost is the best platform for blogging ๐Ÿ’– and have a good JS Client library that was a real inspiration.
  • Zod is a TypeScript-first library for data validation and schema building.
  • Clack to build beautiful prompts.

About

A collection of TypeScript packages and tools to interact with a ghost blog. Type-safe ๐Ÿฆพ Ghost Content API client and CLI ๐Ÿค– tool to export posts in Markdown.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.4%
  • Handlebars 2.8%
  • JavaScript 0.8%