This commit is contained in:
Adam Matthiesen 2024-01-26 05:10:34 -08:00
parent b16694debe
commit bbddc699de
3 changed files with 15 additions and 9 deletions

View File

@ -72,7 +72,7 @@ export default function GhostCMS(options: UserConfig): AstroIntegration {
if (!GhostUserConfig.success) {
const validationError = fromZodError((GhostUserConfig as unknown as SafeParseError<UserConfig>).error);
logger.error(`Config Error - ${ validationError }`);
throw validationError;
throw Error("");
}
const GhostConfig = GhostUserConfig.data;
const GCD = {

View File

@ -7,12 +7,13 @@ export const UserConfigSchema = z.object({
* @example
* // https://astro.build/config
* export default defineConfig({
* site: "https://demo.astro-ghostcms.xyz/",
* integrations: [ghostcms({
* ghostURL: "https://ghostdemo.matthiesen.xyz"
* })],
* integrations: [
* ghostcms({
* ghostURL: "https://ghostdemo.matthiesen.xyz"
* })
* ],
* }); */
ghostURL: z.string().optional(),
ghostURL: z.string().url().optional(),
/** OPTIONAL - Disable Route Injector
* This option allows the user to disable the route injection system and utilize just the integraions other functions. Such as API, sitemap and robotstxt integrations. */
disableRouteInjection: z.boolean().default(false),

View File

@ -4,7 +4,12 @@ import ghostcms from "@matthiesenxyz/astro-ghostcms";
// https://astro.build/config
export default defineConfig({
site: "https://demo.astro-ghostcms.xyz/",
integrations: [ ghostcms({
ghostURL: "https://ghostdemo.matthiesen.xyz"
})],
integrations: [
ghostcms({
disableConsoleOutput: true,
disableRouteInjection: false,
theme: "@matthiesenxyz/astro-ghostcms-theme-default",
ghostURL: "https://ghostdemo.matthiesen.xyz",
})
],
});