From 0c9232a2bd8af0a4b8daab9dfee0b0ea4777165e Mon Sep 17 00:00:00 2001 From: Adam Matthiesen Date: Wed, 17 Jan 2024 02:29:47 -0800 Subject: [PATCH] ready for realease... --- .env.demo | 2 ++ README.md | 3 ++- astro.config.ts | 8 -------- index.ts | 14 +++++++------- package.json | 12 ++++++++++-- 5 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 .env.demo delete mode 100644 astro.config.ts diff --git a/.env.demo b/.env.demo new file mode 100644 index 00000000..fbeecd6d --- /dev/null +++ b/.env.demo @@ -0,0 +1,2 @@ +CONTENT_API_KEY=a33da3965a3a9fb2c6b3f63b48 +CONTENT_API_URL=https://ghostdemo.matthiesen.xyz \ No newline at end of file diff --git a/README.md b/README.md index 14330cf0..c60833b8 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,11 @@ Astro minimum Version: **Astro v4.0** -This Integration is 2 parts. Firstly, there is the API portion that uses the `@tryghost/content-api` to create the link between astro and GhostCMS. From there we move to the Second Part, which is a theme pre-programmed to pull ALL of its data from GhostCMS iteself instead of storing any local data. +This Integration is 2 parts. Firstly, there is the API portion that uses the `@tryghost/content-api` to create the link between astro and GhostCMS. From there we move to the Second Part, which is a theme pre-programmed to pull ALL of its data from GhostCMS iteself instead of storing any data locally outside of Build. - *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.* - If you are looking for a more Customizable option please check [astro-ghostcms-basetheme](https://github.com/MatthiesenXYZ/astro-ghostcms-basetheme) +- This project is not setup for SSR in Integration mode. As such is will most likely not function properly in that mode. You will need to build your own project around the API or customize the *basetheme* linked above. ## Astro Integration Mode diff --git a/astro.config.ts b/astro.config.ts deleted file mode 100644 index 9d96843a..00000000 --- a/astro.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineConfig } from "astro/config"; -import sitemap from "@astrojs/sitemap"; -import GhostCMS from './index'; - -// https://astro.build/config -export default defineConfig({ - integrations: [sitemap(), GhostCMS()], -}); diff --git a/index.ts b/index.ts index f78cb5d1..82dd7edd 100644 --- a/index.ts +++ b/index.ts @@ -11,37 +11,37 @@ export default function GhostCMS(): AstroIntegration { injectRoute({ pattern: '/', - entrypoint: './src/routes/index.astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/index.astro' }) injectRoute({ pattern: '/[slug]', - entrypoint: './src/routes/[slug].astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/[slug].astro' }) injectRoute({ pattern: '/tags', - entrypoint: './src/routes/tags.astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/tags.astro' }) injectRoute({ pattern: '/authors', - entrypoint: './src/routes/authors.astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/authors.astro' }) injectRoute({ pattern: '/tag/[slug]', - entrypoint: './src/routes/tag/[slug].astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/tag/[slug].astro' }) injectRoute({ pattern: '/author/[slug]', - entrypoint: './src/routes/author/[slug].astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/author/[slug].astro' }) injectRoute({ pattern: '/archives/[...page]', - entrypoint: './src/routes/archives/[...page].astro' + entrypoint: '@matthiesenxyz/astro-ghostcms/archives/[...page].astro' }) logger.info('Astro GhostCMS Plugin Loaded!') diff --git a/package.json b/package.json index d9c0ffe8..349ca7cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@matthiesenxyz/astro-ghostcms", "description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content", - "version": "2.0.0-dev.1", + "version": "2.0.0", "author": "MatthiesenXYZ (https://matthiesen.xyz)", "type": "module", "license": "MIT", @@ -32,9 +32,17 @@ ], "keywords": [ "astro-component", + "astro-integration", "withastro", + "astro", + "blog", + "content", + "integration", "ghost", - "ghostcms" + "ghostcms", + "ghostcms-theme", + "ghost-theme", + "astro-theme" ], "scripts": { "dev": "astro dev",