Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
20 KiB
@astrojs/rss
4.0.14
Patch Changes
- #14813
e1dd377Thanks @ematipico! - Removespicocolorsas dependency in favor of the forkpiccolore.
4.0.13
Patch Changes
- #14598
7b45c65Thanks @delucis! - Reduces terminal text styling dependency size by switching fromkleurtopicocolors
4.0.12
Patch Changes
4.0.11
Patch Changes
- #12829
ebe2aa9Thanks @SapphicMoe! - Revert incorrect Content-Type header applied for RSS XML file
4.0.10
Patch Changes
- #12644
5b9b618Thanks @kunyan! - Sends the standard RSS content type response header, with UTF-8 charset
4.0.9
Patch Changes
- #12157
925cff3Thanks @bholmesdev! - Improves README configuration reference.
4.0.8
Patch Changes
-
#12137
50dd88bThanks @ArmandPhilippot! - Fixes an error that occurred when the optionalpubDateproperty was missing in an item. -
#12137
50dd88bThanks @ArmandPhilippot! - Fixes an error where docs incorrectly stated thetitle,linkandpubDateproperties of RSS items was required.
4.0.7
Patch Changes
- #11299
8ce66f2Thanks @ematipico! - Fixes an issue where thepagesGlobToRssItemsreturned an incorrect type foritems
4.0.6
Patch Changes
- #11050
841df1fThanks @mingjunlu! - Fixes an issue where trailing slash is not removed even if thetrailingSlashoption is set tofalse.
4.0.5
Patch Changes
- #9967
8b8f26fdf2af2a769f4846bdaaf4cf6b30f9e37cThanks @madcampos! - Allows `enclosure' to have a length of 0
4.0.4
Patch Changes
- #9797
457e8b6422704ba23347c766a8bb9c101c2aba0bThanks @wkillerud! - RestoresrssSchemato a zod object
4.0.3
Patch Changes
- #9746
7356336d18c916804001bdf64bff5445d82bacebThanks @florian-lefebvre! - FixesrssSchemadefinition to allow calling standard zod object methods (likeextend)
4.0.2
Patch Changes
- #9610
24663c9695385fed9ece57bf4aecdca3a8581e70Thanks @florian-lefebvre! - Fixes the RSS schema to make thetitleoptional if the description is already provided. It also makespubDateandlinkoptional, as specified in the RSS specification.
4.0.1
Patch Changes
- #9299
edfae50e6Thanks @cdvillard! - Improves the@astrojs/rsserror message thrown when the object passed to theitemsproperty is missing any of the three required keys or if one of those keys is mistyped.
4.0.0
Major Changes
- #9168
153a5abb9Thanks @bluwy! - Removes the deprecated (in v3.0)draftsoption as the feature is deprecated in Astro 3.0
4.0.0-beta.0
Major Changes
- #9168
153a5abb9Thanks @bluwy! - Removes thedraftsoption as the feature is deprecated in Astro 3.0
3.0.0
Major Changes
-
#8188
d0679a666Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023. -
#8179
6011d52d3Thanks @matthewp! - Astro 3.0 Release Candidate -
#8198
cb95aa5f8Thanks @bluwy! - Update therss()default export to return aResponseinstead of a simple object, which is deprecated in Astro 3.0. If you were directly returning therss()result from an endpoint before, this breaking change should not affect you.You can also import
getRssString()to get the RSS string directly and use it to return your own Response:// src/pages/rss.xml.js import { getRssString } from '@astrojs/rss'; export async function get(context) { const rssString = await getRssString({ title: 'Buzz’s Blog', ... }); return new Response(rssString, { headers: { 'Content-Type': 'application/xml', }, }); }
Patch Changes
-
#8099
732111cdcThanks @bluwy! - Deprecate themarkdown.draftsconfiguration option.If you'd like to create draft pages that are visible in dev but not in production, you can migrate to content collections and manually filter out pages with the
draft: truefrontmatter property instead.
3.0.0-rc.2
Major Changes
-
#8198
cb95aa5f8Thanks @bluwy! - Update therss()default export to return aResponseinstead of a simple object, which is deprecated in Astro 3.0. If you were directly returning therss()result from an endpoint before, this breaking change should not affect you.You can also import
getRssString()to get the RSS string directly and use it to return your own Response:// src/pages/rss.xml.js import { getRssString } from '@astrojs/rss'; export async function get(context) { const rssString = await getRssString({ title: 'Buzz’s Blog', ... }); return new Response(rssString, { headers: { 'Content-Type': 'application/xml', }, }); }
3.0.0-rc.1
Major Changes
Patch Changes
-
#8099
732111cdcThanks @bluwy! - Deprecate themarkdown.draftsconfiguration option.If you'd like to create draft pages that are visible in dev but not in production, you can migrate to content collections and manually filter out pages with the
draft: truefrontmatter property instead.
3.0.0-beta.0
Major Changes
1eae2e3f7Thanks @Princesseuh! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
2.4.4
Patch Changes
- #7964
51028f85cThanks @DerTimonius! - Add URL to RSSOptions.site type
2.4.3
Patch Changes
- #7153
e17ed0727Thanks @AkashRajpurohit! - exposes RSSFeedItem type
2.4.2
Patch Changes
-
#7066
a37e67b52Thanks @TheOtterlord! - Fix pubDate schema transformation -
#7104
826e02890Thanks @bluwy! - Specify"files"field to only publish necessary files
2.4.1
Patch Changes
- #6970
b5482cee2Thanks @bholmesdev! - Fix: remove accidental stripping of trailing/1/on canonical URLs
2.4.0
Minor Changes
- #6707
4ea716e56Thanks @philnash! - Added extra elements to the RSS items, including categories and enclosure
2.3.2
Patch Changes
- #6614
b1b9b1390Thanks @aivarsliepa! - FixesRSSOptionstype error when usingstrictestTypescript tsconfig
2.3.1
Patch Changes
- #6538
400ef26c9Thanks @bholmesdev! - Preserve self-closing tags incustomDataoption
2.3.0
Minor Changes
-
#6453
2e362042cThanks @ematipico! - AddedtrailingSlashoption to control whether or not the emitted URLs should have trailing slashes.import rss from '@astrojs/rss'; export const get = () => rss({ trailingSlash: false, });By passing
false, the emitted links won't have trailing slashes.
2.2.0
Minor Changes
- #6213
afbbc4d5bThanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
2.1.1
Patch Changes
2.1.0
Minor Changes
- #5851
81dce94f2Thanks @bholmesdev! - Update RSS config for readability and consistency with Astro 2.0.-
Migration -
import.meta.glob()handlingWe have deprecated
items: import.meta.glob(...)handling in favor of a separatepagesGlobToRssItems()helper. This simplifies ouritemsconfiguration option to accept a single type, without losing existing functionality.If you rely on our
import.meta.glob()handling, we suggest adding thepagesGlobToRssItems()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
rssSchemafor content collections@astrojs/rssnow exposes anrssSchemafor 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
81dce94f2Thanks @bholmesdev! - Update RSS config for readability and consistency with Astro 2.0.-
Migration -
import.meta.glob()handlingWe have deprecated
items: import.meta.glob(...)handling in favor of a separatepagesGlobToRssItems()helper. This simplifies ouritemsconfiguration option to accept a single type, without losing existing functionality.If you rely on our
import.meta.glob()handling, we suggest adding thepagesGlobToRssItems()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
rssSchemafor content collections@astrojs/rssnow exposes anrssSchemafor 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
c76e1c810Thanks @mattstein! - Fixes a bug that prevented an item’scustomDatafrom being included.
1.1.0
Minor Changes
- #5366
081e0a9d2Thanks @smithbm2316! - Added the ability for users to include the full content of their posts/items in each RSS feed entry via the newcontentkey on theRSSFeedItemmodel.
Patch Changes
1.0.3
Patch Changes
- #5164
4a8a346caThanks @MoustaphaDev! - Add support for markdown files with the following extensions:.markdown.mdown.mkdn.mkd.mdwn
1.0.2
Patch Changes
-
#4842
812658ad2Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm) -
#4842
812658ad2Thanks @bluwy! - Remove path-browserify dependency
1.0.1
Patch Changes
- #4701
6e1d62fe2Thanks @bholmesdev! - Fix globs for homepage route
1.0.0
Major Changes
-
04ad44563- > Astro v1.0 is out! Read the official announcement post.No breaking changes. This package is now officially stable and compatible with
astro@1.0.0!
0.2.2
Patch Changes
0.2.1
Patch Changes
0.2.0
Minor Changes
- #3301
0efaf110Thanks @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
1032e450Thanks @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.