diff --git a/package.json b/package.json index 7f75580c..00797c2c 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.1.4", + "version": "2.1.5", "author": "MatthiesenXYZ (https://matthiesen.xyz)", "type": "module", "license": "MIT", diff --git a/src/utils/UserConfigSchema.ts b/src/utils/UserConfigSchema.ts index a06f3dd7..d62200e2 100644 --- a/src/utils/UserConfigSchema.ts +++ b/src/utils/UserConfigSchema.ts @@ -3,18 +3,18 @@ import * as S from './schemas'; export const UserConfigSchema = z.object({ /** OPTIONAL - Theme Selector - * @ This option allows the user to replace the included theme with an external npm module */ + * This option allows the user to replace the included theme with an external npm module */ theme: z.string().default('@matthiesenxyz/astro-ghostcms'), /** OPTIONAL - astrojs/sitemap - * @ This option allows the user to configure the included integration - * @ Options shown are the availble options - * @REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap + * This option allows the user to configure the included integration + * Options shown are the availble options + * REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap */ sitemap: S.SitemapSchema.optional(), /** OPTIONAL - astro-robots-txt - * @ This option allows the user to configure the included integration - * @ Options shown are the availble options - * @REFERENCE https://www.npmjs.com/package/astro-robots-txt#configuration + * This option allows the user to configure the included integration + * Options shown are the availble options + * REFERENCE https://www.npmjs.com/package/astro-robots-txt#configuration */ robotstxt: S.RobotsTxtSchema.optional(), }); diff --git a/src/utils/schemas.ts b/src/utils/schemas.ts index 2f6d47bb..57e0f3d7 100644 --- a/src/utils/schemas.ts +++ b/src/utils/schemas.ts @@ -1,45 +1,45 @@ -import { boolean, string, z } from 'astro/zod'; +import { z } from 'astro/zod'; export const SitemapSchema = z.object({ /** EXAMPLE: ['https://example-1.com', 'https://example-2.com] - * @REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap/#custompages + * REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap/#custompages */ customPages: z.string().array().optional(), /** EXAMPLE: 10000 - * @REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap/#entrylimit + * REFERENCE https://docs.astro.build/en/guides/integrations-guide/sitemap/#entrylimit */ entryLimit: z.number().optional() }) const RobotsPolicySchema = z.object({ /** You must provide a name of the automatic client (search engine crawler). - * @ Wildcards are allowed. + * Wildcards are allowed. */ userAgent: z.string(), /** Allowed paths for crawling */ - allow: z.string().or(string().array()).optional(), + allow: z.string().optional(), /** Disallowed paths for crawling */ - disallow: z.string().or(string().array()).optional(), + disallow: z.string().optional(), /** Indicates that the page's URL contains parameters that should be ignored during crawling. - * @ Maximum string length is limited to 500. + * Maximum string length is limited to 500. */ - cleanParam: z.string().or(string().array()).optional(), + cleanParam: z.string().optional(), /** Minimum interval (in secs) for the crawler to wait after loading one page, before starting other */ crawlDelay: z.number().optional() }) export const RobotsTxtSchema = z.object({ - /** @EXAMPLE1 host: true - automatically resolve using the site option from Astro config - * @EXAMPLE2 host: 'example.com' + /** EXAMPLE1 host: true - automatically resolve using the site option from Astro config + * EXAMPLE2 host: 'example.com' */ - host: z.string().or(boolean()).optional(), - /** @EXAMPLE1 sitemap: "https://example.com/sitemap-0.xml" - * @EXAMPLE2 sitemap: ['https://example.com/sitemap-0.xml','https://example.com/sitemap-1.xml'] - * @EXAMPLE3 sitemap: false - If you want to get the robots.txt file without the Sitemap: ... entry, set the sitemap parameter to false. + host: z.string().optional(), + /** EXAMPLE1 sitemap: "https://example.com/sitemap-0.xml" + * EXAMPLE2 sitemap: ['https://example.com/sitemap-0.xml','https://example.com/sitemap-1.xml'] + * EXAMPLE3 sitemap: false - If you want to get the robots.txt file without the Sitemap: ... entry, set the sitemap parameter to false. */ - sitemap: z.string().or(boolean()).or(string().array()).optional(), + sitemap: z.string().optional(), /** astrojs/sitemap and astro-sitemap integrations have the sitemap-index.xml as their primary output. That is why the default value of sitemapBaseFileName is set to sitemap-index. - * @EXAMPLE sitemapBaseFileName: 'custom-sitemap' + * EXAMPLE sitemapBaseFileName: 'custom-sitemap' */ sitemapBaseFileName: z.string().optional(), /** SET POLICY RULES */