diff options
Diffstat (limited to 'packages/astro-rss/src')
-rw-r--r-- | packages/astro-rss/src/index.ts | 16 | ||||
-rw-r--r-- | packages/astro-rss/src/schema.ts | 1 |
2 files changed, 1 insertions, 16 deletions
diff --git a/packages/astro-rss/src/index.ts b/packages/astro-rss/src/index.ts index a611afc16..48c5defe8 100644 --- a/packages/astro-rss/src/index.ts +++ b/packages/astro-rss/src/index.ts @@ -27,11 +27,6 @@ export type RSSOptions = { stylesheet?: z.infer<typeof rssOptionsValidator>['stylesheet']; /** Specify custom data in opening of file */ customData?: z.infer<typeof rssOptionsValidator>['customData']; - /** - * Whether to include drafts or not - * @deprecated Deprecated since version 3.0. Use content collections instead. - */ - drafts?: z.infer<typeof rssOptionsValidator>['drafts']; trailingSlash?: z.infer<typeof rssOptionsValidator>['trailingSlash']; }; @@ -48,11 +43,6 @@ export type RSSFeedItem = { description?: z.infer<typeof rssSchema>['description']; /** Append some other XML-valid data to this item */ customData?: z.infer<typeof rssSchema>['customData']; - /** - * Whether draft or not - * @deprecated Deprecated since version 3.0. Use content collections instead. - */ - draft?: z.infer<typeof rssSchema>['draft']; /** Categories or tags related to the item */ categories?: z.infer<typeof rssSchema>['categories']; /** The item author's email address */ @@ -92,7 +82,6 @@ const rssOptionsValidator = z.object({ return items; }), xmlns: z.record(z.string()).optional(), - drafts: z.boolean().default(false), stylesheet: z.union([z.string(), z.boolean()]).optional(), customData: z.string().optional(), trailingSlash: z.boolean().default(true), @@ -159,10 +148,7 @@ export function pagesGlobToRssItems(items: GlobResult): Promise<ValidatedRSSFeed /** Generate RSS 2.0 feed */ async function generateRSS(rssOptions: ValidatedRSSOptions): Promise<string> { - const { site } = rssOptions; - const items = rssOptions.drafts - ? rssOptions.items - : rssOptions.items.filter((item) => !item.draft); + const { items, site } = rssOptions; const xmlOptions = { ignoreAttributes: false, diff --git a/packages/astro-rss/src/schema.ts b/packages/astro-rss/src/schema.ts index eb15ecd58..98aa35f81 100644 --- a/packages/astro-rss/src/schema.ts +++ b/packages/astro-rss/src/schema.ts @@ -8,7 +8,6 @@ export const rssSchema = z.object({ .refine((value) => !isNaN(value.getTime())), description: z.string().optional(), customData: z.string().optional(), - draft: z.boolean().optional(), categories: z.array(z.string()).optional(), author: z.string().optional(), commentsUrl: z.string().optional(), |