@matthiesenxyz/starlight-ghostcms
v0.1.9
Published
Starlight GhostCMS plugin to allow easier importing of GhostCMS Content into your starlight website
Downloads
8
Maintainers
Readme
Welcome to Starlight-GhostCMS by Astro-GhostCMS
Starlight-GhostCMS is a Starlight plugin to add a blog to your documentation site.
- Customizable Header link (Defaults to "Blog")
- Pulls all the Posts from your GhostCMS install
- Pulls all Authors & Featured Images and adds then to your Posts
- Creates a custom section on your website linkable from the Header
For a full always up to date documentation please checkout Our Website
- Starlight GhostCMS Demo
- Astro-GhostCMS Website Check the website for the most up-to-date Documentation!
- Ghost.org Get your own Ghost[^1] Install
Need help but don't have Github? Email us at [email protected] to create an issue here on github! Or join our Discord
Astro minimum Version: Starlight v0.19 & Astro v4
Installation
Prerequisites:
- You will need to have a Starlight Website Setup. If you dont have one yet, you can follow the "Getting Started" guide in the Starlight docs to create one.
- You will need a GhostCMS server, and your
CONTENT_API_KEY
&CONTENT_API_URL
. Your GhostCMS server must also support thev5
Version of the GhostAPI. If you dont already have your Key and Url, you can find out how to get those on the Ghost docs HERE
Install the plugin
Starlight GhostCMS is a Starlight plugin. Install it using your favorite package manager. Below is 3 examples of what to run. CHOOSE ONE.
npm install @matthiesenxyz/starlight-ghostcms
pnpm add @matthiesenxyz/starlight-ghostcms
yarn add @matthiesenxyz/starlight-ghostcms
Configure the pluign
The Starlight GhostCMS plugin can be configured in your Starlight configuration in the astro.config.mjs
file.
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import starlightGhostCMS from '@matthiesenxyz/starlight-ghostcms';
export default defineConfig({
integrations: [
starlight({
plugins: [
starlightGhostCMS({
ghostURL: "https://ghostdemo.matthiesen.xyz"
})
],
title: 'My Docs',
}),
],
})
Set your GhostCMS ENV Variables
You must also create 2 environment variables in a .env
file with the following:
CONTENT_API_KEY=a33da3965a3a9fb2c6b3f63b48
CONTENT_API_URL=https://ghostdemo.matthiesen.xyz // ghostURL option in `astro.config.mjs` will take priority. (This is fallback option)
GITHUB_PERSONAL_TOKEN=ghp_ //OPTIONAL - This is for Astro-Gists if you choose to use it!
When you deploy your install dont forget to set the above ENVIRONMENT VARIABLES on your provider!
For more information and to see the docs please check our website: Astro-GhostCMS.xyz
Foot Notes & Credits
[^1]: Ghost.org, Ghost.io, Ghost are all trademarks of The Ghost Foundation. This project is Open Source and not directly related to or provided by The Ghost Foundation and is intended to help create a easier method to utilize their provided JavaScript tools to link a Headless GhostCMS install in to your Astro project.