summaryrefslogtreecommitdiff
path: root/packages/astro-rss
diff options
context:
space:
mode:
authorGravatar Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com> 2023-01-24 08:38:06 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-24 11:38:06 -0500
commit73ca0ef38352896f7c8fdaae23f881d02e60a180 (patch)
tree0e0efa55fc1e49b7e5ad2ca100ff93803344cc3e /packages/astro-rss
parent58dfdc5a364e4ba46538466af8666e70af21987f (diff)
downloadastro-935148a22f6772eeb66ac6a9b62c389c6e28d45c.tar.gz
astro-935148a22f6772eeb66ac6a9b62c389c6e28d45c.tar.zst
astro-935148a22f6772eeb66ac6a9b62c389c6e28d45c.zip
* [ci] release * Update changelogs (#5955) * [ci] release * Wrap astro 2.0 beta logs in `<details>` * Add link to docs upgrade guide * First pass cleaning up 2.0 release notes * mdx changes from Sarah * combine 5584 and 5842 in deno, image, netlify * markdown/remark incl (5684 & 5769) to match mdx * Tweak markdown/remark formatting * Format astro-prism * Format astro-rss * Format create-astro * Format cloudflare * Format lit * Format partytown * Format node * Format preact * Format react * Format solid * Format svelte * Format tailwind * Format vercel * Format vue * Format telemetry * Format webapi * Format scripts * Reinstate h3s for headings Co-authored-by: Ben Holmes <hey@bholmes.dev> * Reformat mdx * astro & markdown/remark: Combine #5679 & #5684 changelogs Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Ben Holmes <hey@bholmes.dev> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Ben Holmes <hey@bholmes.dev>
Diffstat (limited to 'packages/astro-rss')
-rw-r--r--packages/astro-rss/CHANGELOG.md99
-rw-r--r--packages/astro-rss/package.json2
2 files changed, 74 insertions, 27 deletions
diff --git a/packages/astro-rss/CHANGELOG.md b/packages/astro-rss/CHANGELOG.md
index 8f93cbc83..95e9b67c0 100644
--- a/packages/astro-rss/CHANGELOG.md
+++ b/packages/astro-rss/CHANGELOG.md
@@ -1,46 +1,93 @@
# @astrojs/rss
+## 2.1.0
+
+### Minor Changes
+
+- [#5851](https://github.com/withastro/astro/pull/5851) [`81dce94f2`](https://github.com/withastro/astro/commit/81dce94f2a6db598bd9e47fc2a4b9d713e58f286) Thanks [@bholmesdev](https://github.com/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:
+
+ ```diff
+ // 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:
+
+ ```ts
+ import { defineCollection } from 'astro:content';
+ import { rssSchema } from '@astrojs/rss';
+
+ const blog = defineCollection({
+ schema: rssSchema,
+ });
+
+ export const collections = { blog };
+ ```
+
## 2.1.0-beta.0
+<details>
+<summary>See changes in 2.1.0-beta.0</summary>
+
### Minor Changes
- [#5851](https://github.com/withastro/astro/pull/5851) [`81dce94f2`](https://github.com/withastro/astro/commit/81dce94f2a6db598bd9e47fc2a4b9d713e58f286) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Update RSS config for readability and consistency with Astro 2.0.
- #### Migration - `import.meta.glob()` handling
+ - **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.
- 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:
- If you rely on our `import.meta.glob()` handling, we suggest adding the `pagesGlobToRssItems()` wrapper to your RSS config:
+ ```diff
+ // src/pages/rss.xml.js
+ import rss, {
+ + pagesGlobToRssItems
+ } from '@astrojs/rss';
- ```diff
- // 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}'),
+ + ),
+ });
+ }
+ ```
- export function get(context) {
- return rss({
- + items: pagesGlobToRssItems(
- import.meta.glob('./blog/*.{md,mdx}'),
- + ),
- });
- }
- ```
+ - **New `rssSchema` for content collections**
- #### 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:
- `@astrojs/rss` now exposes an `rssSchema` for use with content collections. This ensures all RSS feed properties are present in your frontmatter:
+ ```ts
+ import { defineCollection } from 'astro:content';
+ import { rssSchema } from '@astrojs/rss';
- ```ts
- import { defineCollection } from 'astro:content';
- import { rssSchema } from '@astrojs/rss';
+ const blog = defineCollection({
+ schema: rssSchema,
+ });
- const blog = defineCollection({
- schema: rssSchema,
- });
+ export const collections = { blog };
+ ```
- export const collections = { blog };
- ```
+</details>
## 2.0.0
diff --git a/packages/astro-rss/package.json b/packages/astro-rss/package.json
index 06481fb05..1de43ed39 100644
--- a/packages/astro-rss/package.json
+++ b/packages/astro-rss/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/rss",
"description": "Add RSS feeds to your Astro projects",
- "version": "2.1.0-beta.0",
+ "version": "2.1.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",