diff --git a/index.ts b/index.ts index 4722e221..bb98a920 100644 --- a/index.ts +++ b/index.ts @@ -8,43 +8,68 @@ export default function GhostCMS(): AstroIntegration { injectRoute, logger, }) => { - + + logger.info("Injecting Route: /") + injectRoute({ pattern: '/', entrypoint: '@matthiesenxyz/astro-ghostcms/index.astro' }) + logger.info("Injecting Route: /[slug]") + injectRoute({ pattern: '/[slug]', entrypoint: '@matthiesenxyz/astro-ghostcms/[slug].astro' }) + logger.info("Injecting Route: /tags") + injectRoute({ pattern: '/tags', entrypoint: '@matthiesenxyz/astro-ghostcms/tags.astro' }) + logger.info("Injecting Route: /authors") + injectRoute({ pattern: '/authors', entrypoint: '@matthiesenxyz/astro-ghostcms/authors.astro' }) + logger.info("Injecting Route: /tag/[slug]") + injectRoute({ pattern: '/tag/[slug]', entrypoint: '@matthiesenxyz/astro-ghostcms/tag/[slug].astro' }) + logger.info("Injecting Route: /author/[slug]") + injectRoute({ pattern: '/author/[slug]', entrypoint: '@matthiesenxyz/astro-ghostcms/author/[slug].astro' }) + logger.info("Injecting Route: /archives/[...page]") + injectRoute({ pattern: '/archives/[...page]', entrypoint: '@matthiesenxyz/astro-ghostcms/archives/[...page].astro' }) - logger.info('Astro GhostCMS Plugin Loaded!') + }, + 'astro:config:done': async ({ + config, + logger, + }) => { + if (config.output === "server"){ + logger.error("This integration is not yet ready to be used in 'output: server' mode, to prevent issues please switch to static.") + } else if (config.output === "hybrid"){ + logger.error("This integration is not yet ready to be used in 'output: hybrid' mode, to prevent issues please switch to static.") + }else { + logger.info('GhostCMS Routes Injected. Integration is now ready.') + } } } } diff --git a/package.json b/package.json index 7e5d43c1..c1820ab0 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.4", + "version": "2.0.5", "author": "MatthiesenXYZ (https://matthiesen.xyz)", "type": "module", "license": "MIT",