0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/astro-rss/CHANGELOG.md
2023-01-24 16:40:14 +00:00

7.2 KiB
Raw Blame History

@astrojs/rss

2.1.0

Minor Changes

  • #5851 81dce94f2 Thanks @bholmesdev! - Update RSS config for readability and consistency with Astro 2.0.

    • Migration - import.meta.glob() handling

      We have deprecated items: import.meta.glob(...) handling in favor of a separate pagesGlobToRssItems() helper. This simplifies our items configuration option to accept a single type, without losing existing functionality.

      If you rely on our import.meta.glob() handling, we suggest adding the pagesGlobToRssItems() wrapper to your RSS config:

      // src/pages/rss.xml.js
      import rss, {
      +  pagesGlobToRssItems
      } from '@astrojs/rss';
      
      export function get(context) {
        return rss({
      +    items: pagesGlobToRssItems(
            import.meta.glob('./blog/*.{md,mdx}'),
      +    ),
        });
      }
      
    • New rssSchema for content collections

      @astrojs/rss now exposes an rssSchema for use with content collections. This ensures all RSS feed properties are present in your frontmatter:

      import { defineCollection } from 'astro:content';
      import { rssSchema } from '@astrojs/rss';
      
      const blog = defineCollection({
        schema: rssSchema,
      });
      
      export const collections = { blog };
      

2.1.0-beta.0

See changes in 2.1.0-beta.0

Minor Changes

  • #5851 81dce94f2 Thanks @bholmesdev! - Update RSS config for readability and consistency with Astro 2.0.

    • Migration - import.meta.glob() handling

      We have deprecated items: import.meta.glob(...) handling in favor of a separate pagesGlobToRssItems() helper. This simplifies our items configuration option to accept a single type, without losing existing functionality.

      If you rely on our import.meta.glob() handling, we suggest adding the pagesGlobToRssItems() wrapper to your RSS config:

      // src/pages/rss.xml.js
      import rss, {
      +  pagesGlobToRssItems
      } from '@astrojs/rss';
      
      export function get(context) {
        return rss({
      +    items: pagesGlobToRssItems(
            import.meta.glob('./blog/*.{md,mdx}'),
      +    ),
        });
      }
      
    • New rssSchema for content collections

      @astrojs/rss now exposes an rssSchema for use with content collections. This ensures all RSS feed properties are present in your frontmatter:

      import { defineCollection } from 'astro:content';
      import { rssSchema } from '@astrojs/rss';
      
      const blog = defineCollection({
        schema: rssSchema,
      });
      
      export const collections = { blog };
      

2.0.0

Major Changes

1.2.1

Patch Changes

1.2.0

Minor Changes

  • c76e1c810 Thanks @mattstein! - Fixes a bug that prevented an items customData from being included.

1.1.0

Minor Changes

  • #5366 081e0a9d2 Thanks @smithbm2316! - Added the ability for users to include the full content of their posts/items in each RSS feed entry via the new content key on the RSSFeedItem model.

Patch Changes

1.0.3

Patch Changes

  • #5164 4a8a346ca Thanks @MoustaphaDev! - Add support for markdown files with the following extensions:
    • .markdown
    • .mdown
    • .mkdn
    • .mkd
    • .mdwn

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

  • #3301 0efaf110 Thanks @bholmesdev! - Change the optional "canonicalUrl" argument to a required "site" argument. This fixes problems with import.meta.env.SITE. If you want to use your project's "site" field for your RSS feeds, set site: import.meta.env.SITE in the rss function options

0.1.1

Patch Changes

  • 1032e450 Thanks @FredKSchott! - Introduce new @astrojs/rss package for RSS feed generation! This also adds a new global env variable for your project's configured "site": import.meta.env.SITE. This is consumed by the RSS feed helper to generate the correct canonical URL.