diff options
author | 2021-04-23 10:44:41 -0600 | |
---|---|---|
committer | 2021-04-23 10:44:41 -0600 | |
commit | 510e7920d267e8181f255d3b321bbfda11417d33 (patch) | |
tree | 8b202aa3df022116375fd2e5de46657fdf2e85cb /examples/blog | |
parent | 5eb232501f8f02236e52cf945b7fa3ce5a2ec260 (diff) | |
download | astro-510e7920d267e8181f255d3b321bbfda11417d33.tar.gz astro-510e7920d267e8181f255d3b321bbfda11417d33.tar.zst astro-510e7920d267e8181f255d3b321bbfda11417d33.zip |
Add RSS generation (#123)
Diffstat (limited to 'examples/blog')
-rw-r--r-- | examples/blog/astro/pages/$posts.astro | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/blog/astro/pages/$posts.astro b/examples/blog/astro/pages/$posts.astro index da688c041..ebb20705d 100644 --- a/examples/blog/astro/pages/$posts.astro +++ b/examples/blog/astro/pages/$posts.astro @@ -18,7 +18,18 @@ export async function createCollection() { allPosts.sort((a, b) => new Date(b.date) - new Date(a.date)); return allPosts; }, - pageSize: 3 + pageSize: 3, + rss: { + title: 'Muppet Blog', + description: 'An example blog on Astro', + customData: `<language>en-us</language>`, + item: (item) => ({ + title: item.title, + description: item.description, + link: item.url, + pubDate: item.date, + }), + } }; } --- |