mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Improve Collection docs for RSS (#990)
- Added missing but required link attribute - Added note on how to create a full text feed
This commit is contained in:
parent
418bc1d91c
commit
52ca7fafb0
1 changed files with 5 additions and 1 deletions
|
@ -245,6 +245,7 @@ export async function createCollection() {
|
|||
},
|
||||
rss: {
|
||||
title: 'My RSS Feed',
|
||||
// if you want a full text feed, add your markup here (e.g. item.astro.html)
|
||||
description: 'Description of the feed',
|
||||
// (optional) add xmlns:* properties to root element
|
||||
xmlns: {
|
||||
|
@ -260,7 +261,10 @@ export async function createCollection() {
|
|||
description: item.description,
|
||||
// enforce GMT timezone (otherwise it'll be different based on where it's built)
|
||||
pubDate: item.pubDate + 'Z',
|
||||
// custom data is supported here as well
|
||||
// link is required, shows up in RSS readers
|
||||
link: '/collection/' + item.id
|
||||
// (optional) custom data is supported here as well
|
||||
customData: ``<id>${Astro.site}collection/${item.id}</id>``
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue