summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Tushar Sadhwani <tushar.sadhwani000@gmail.com> 2021-09-03 23:20:05 +0530
committerGravatar GitHub <noreply@github.com> 2021-09-03 10:50:05 -0700
commit373e44d0a59339fd6b15280afd4b35b05fc94deb (patch)
treeb33157034f36687c7254fba4f49d7fe29b0b2240
parent231020368e17550b397cf966dfec68ff43c29bf5 (diff)
downloadastro-373e44d0a59339fd6b15280afd4b35b05fc94deb.tar.gz
astro-373e44d0a59339fd6b15280afd4b35b05fc94deb.tar.zst
astro-373e44d0a59339fd6b15280afd4b35b05fc94deb.zip
Comment out RSS call in example (#1302)
* Comment out RSS call in example * Update [...page].astro Co-authored-by: Fred K. Schott <fkschott@gmail.com>
-rw-r--r--examples/blog-multiple-authors/src/pages/posts/[...page].astro28
1 files changed, 15 insertions, 13 deletions
diff --git a/examples/blog-multiple-authors/src/pages/posts/[...page].astro b/examples/blog-multiple-authors/src/pages/posts/[...page].astro
index 028d17e34..056796deb 100644
--- a/examples/blog-multiple-authors/src/pages/posts/[...page].astro
+++ b/examples/blog-multiple-authors/src/pages/posts/[...page].astro
@@ -14,19 +14,21 @@ import authorData from '../../data/authors.json';
export async function getStaticPaths({paginate, rss}) {
const allPosts = Astro.fetchContent('../post/*.md');
const sortedPosts = allPosts.sort((a, b) => new Date(b.date) - new Date(a.date));
- // Generate an RSS feed from this collection
- // TODO: DONT MERGE: This requires buildOptions.site to be set, which can't be set in a template
- rss({
- title: 'Don’s Blog',
- description: 'An example blog on Astro',
- customData: `<language>en-us</language>`,
- items: sortedPosts.map(item => ({
- title: item.title,
- description: item.description,
- link: item.url,
- pubDate: item.date,
- })),
- });
+
+ // Generate an RSS feed from this collection of posts.
+ // NOTE: This is disabled by default, since it requires `buildOptions.site` to be set in your "astro.config.mjs" file.
+ // rss({
+ // title: 'Don’s Blog',
+ // description: 'An example blog on Astro',
+ // customData: `<language>en-us</language>`,
+ // items: sortedPosts.map(item => ({
+ // title: item.title,
+ // description: item.description,
+ // link: item.url,
+ // pubDate: item.date,
+ // })),
+ // });
+
// Return a paginated collection of paths for all posts
return paginate(sortedPosts, {pageSize: 1});
}