Easily migrate your Ghost Site to Astro, an Astro Integration that turns your Ghost server into a Headless CMS https://astro-ghostcms.xyz/
Go to file
Adam Matthiesen 8975fe960b 1.0.2, last type fix... now the basetheme has no type errors! 2024-01-15 00:12:21 -08:00
src update to 1.0.0, code cleanup 2024-01-14 18:32:41 -08:00
LICENSE Add License 2024-01-14 05:53:06 -08:00
README.md update to 1.0.0, code cleanup 2024-01-14 18:32:41 -08:00
index.d.ts 1.0.2, last type fix... now the basetheme has no type errors! 2024-01-15 00:12:21 -08:00
index.ts update to 1.0.0, code cleanup 2024-01-14 18:32:41 -08:00
package.json 1.0.2, last type fix... now the basetheme has no type errors! 2024-01-15 00:12:21 -08:00

README.md

Welcome to Astro-GhostCMS

This addon uses the @tryghost/content-api and creates astro friendly functions to interface between ghost and astro.

This package contains a independent copy of the tryghost content-api.js that is used to establish the connection so this package dose not depend on @tryghost/content-api package.

Installation

npm install @adammatthiesen/astro-ghostcms

Must create .env with the following:

CONTENT_API_KEY=
CONTENT_API_URL=

Astro minimum Version: Astro v4.0

Dependencies:

  • Axios v1.0 Will be auto installed
  • Typescript v5.3.3 Will be auto installed

Work In Progress README (More Information will be provided as time goes on...)

Basic Usage:

import { getGhostPosts } from "@adammatthiesen/astro-ghostcms";
  • getGhostPosts() - Get list of posts
  • getGhostRecentPosts(setLimit?) - Get Recent Posts (setLimit={6})
  • getGhostFeaturedPosts(setLimit?) - Get Featured Posts (setLimit={1})
  • getGhostPostbySlug(slug) - Get Post by Slug
  • getGhostPostsbyTag(slug) - Get Posts list by Tag slug
  • getGhostTags() - Get list of tags
  • getGhostTagbySlug(slug) - Get Tag by slug
  • getGhostAuthors() - Get list of Authors
  • getGhostPages() - Get list of Pages
  • getGhostPage(slug) - Get page by slug
  • getGhostSettings() - Get Settings for GhostCMS