You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/astro-rss/README.md
+7-15Lines changed: 7 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Start by [adding a `site` to your project's `astro.config` for link generation](
28
28
importrssfrom'@astrojs/rss';
29
29
import { getCollection } from'astro:content';
30
30
31
-
exportasyncfunctionget(context) {
31
+
exportasyncfunctionGET(context) {
32
32
constposts=awaitgetCollection('blog');
33
33
returnrss({
34
34
title:'Buzz’s Blog',
@@ -55,7 +55,7 @@ Read **[Astro's RSS docs][astro-rss]** for more on using content collections, an
55
55
The `rss` default export offers a number of configuration options. Here's a quick reference:
56
56
57
57
```js
58
-
exportfunctionget(context) {
58
+
exportfunctionGET(context) {
59
59
returnrss({
60
60
// `<title>` field in output xml
61
61
title:'Buzz’s Blog',
@@ -98,7 +98,7 @@ The base URL to use when generating RSS item links. We recommend using the [endp
98
98
```ts
99
99
importrssfrom'@astrojs/rss';
100
100
101
-
exportconstget= (context) =>
101
+
exportconstGET= (context) =>
102
102
rss({
103
103
site: context.site,
104
104
// ...
@@ -113,14 +113,6 @@ A list of formatted RSS feed items. See [Astro's RSS items documentation](https:
113
113
114
114
When providing a formatted RSS item list, see the [`RSSFeedItem` type reference](#rssfeeditem).
115
115
116
-
### drafts
117
-
118
-
Type: `boolean (optional)`
119
-
120
-
**Deprecated**: Manually filter `items` instead.
121
-
122
-
Set `drafts: true` to include [draft posts](https://docs.astro.build/en/guides/markdown-content/#draft-pages) in the feed output. By default, this option is `false` and draft posts are not included.
123
-
124
116
### stylesheet
125
117
126
118
Type: `string (optional)`
@@ -136,7 +128,7 @@ A string of valid XML to be injected between your feed's `<description>` and `<i
136
128
```js
137
129
importrssfrom'@astrojs/rss';
138
130
139
-
exportconstget= () =>rss({
131
+
exportconstGET= () =>rss({
140
132
...
141
133
customData:'<language>en-us</language>',
142
134
});
@@ -181,7 +173,7 @@ By default, the library will add trailing slashes to the emitted URLs. To preven
181
173
```js
182
174
import rss from '@astrojs/rss';
183
175
184
-
export const get = () =>
176
+
export const GET = () =>
185
177
rss({
186
178
trailingSlash: false,
187
179
});
@@ -361,7 +353,7 @@ This function assumes, but does not verify, you are globbing for items inside `s
361
353
// src/pages/rss.xml.js
362
354
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
363
355
364
-
export async function get(context) {
356
+
export async function GET(context) {
365
357
return rss({
366
358
title: 'Buzz’s Blog',
367
359
description: 'A humble Astronaut’s guide to the stars',
@@ -379,7 +371,7 @@ As `rss()` returns a `Response`, you can also use `getRssString()` to get the RS
* The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute).
898
-
*
899
-
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `functionPerRoute` to define how your SSR code is bundled.
900
-
*
901
-
*/
902
-
split?: boolean;
903
-
904
-
/**
905
-
* @docs
906
-
* @name build.excludeMiddleware
907
-
* @type {boolean}
908
-
* @default `false`
909
-
* @deprecated Deprecated since version 3.0.
910
-
* @description
911
-
* The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware).
912
-
*
913
-
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `edgeMiddleware` to define whether or not any SSR middleware code will be bundled when built.
* @deprecated Deprecated since version 3.0. Use content collections instead.
1192
-
* @description
1193
-
* Control whether Markdown draft pages should be included in the build.
1194
-
*
1195
-
* A Markdown page is considered a draft if it includes `draft: true` in its frontmatter. Draft pages are always included & visible during development (`astro dev`) but by default they will not be included in your final build.
1196
-
*
1197
-
* ```js
1198
-
* {
1199
-
* markdown: {
1200
-
* // Example: Include all drafts in your final build
0 commit comments