@matthiesenxyz/starlight-ghostcms
TypeScript icon, indicating that this package has built-in type declarations

0.1.9 • Public • Published

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

Need help but don't have Github? Email us at issues@astro-ghostcms.xyz to create an issue here on github! Or join our Discord

Astro minimum Version: Starlight v0.19 & Astro v4

Installation

Prerequisites:

  1. 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.
  2. You will need a GhostCMS server, and your CONTENT_API_KEY & CONTENT_API_URL. Your GhostCMS server must also support the v5 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.

Package Sidebar

Install

npm i @matthiesenxyz/starlight-ghostcms

Weekly Downloads

8

Version

0.1.9

License

MIT

Unpacked Size

72.8 kB

Total Files

42

Last publish

Collaborators

  • adammatthiesen