aboutsummaryrefslogtreecommitdiff
path: root/examples/blog/src/pages/rss.xml.js
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2023-01-19 11:24:55 -0500
committerGravatar GitHub <noreply@github.com> 2023-01-19 11:24:55 -0500
commit81dce94f2a6db598bd9e47fc2a4b9d713e58f286 (patch)
tree63bbd46767dfc7caaa5f44f9cf4ade242355462f /examples/blog/src/pages/rss.xml.js
parent97267e388135fd07f7780eee760b2e52f4247dfa (diff)
downloadastro-81dce94f2a6db598bd9e47fc2a4b9d713e58f286.tar.gz
astro-81dce94f2a6db598bd9e47fc2a4b9d713e58f286.tar.zst
astro-81dce94f2a6db598bd9e47fc2a4b9d713e58f286.zip
[RSS] Get ready for content collections (#5851)
* chore: strictNullChecks for zod * feat: expose `rssSchema` helper * refactor: align types with schema types * feat: break glob handler to globToRssItems util * refactor: RSS options validation to Zod * refactor: avoid intermediate type * fix: allow numbers and dates in pubDate * test: update glob and error tests * feat: add rss to with-content starter * fix: move globToRssItems back to internal behavior * chore: JSON.stringify * Revert "fix: move globToRssItems back to internal behavior" This reverts commit 85305075e6444907455541b24bccbccd5016951a. * test: missing url * docs: `import.meta.env.SITE` -> `context.site` * docs: update README to content collections example * fix: url -> link * docs: add `rssSchema` to README * chore: consistent formatting * docs: add `pagesGlobToRssItems()` reference * chore: globToRssItems -> pagesGlobToRssItems * chore: changeset * fix: bad docs line highlighting * fix: add collections export to example * nit: remove "our" * fix: are -> all * fix: more README edits * deps: kleur * chore: add back import.meta.glob handling as deprecated * docs: bump down to `minor`, update headline to be less content collections-y * typo: suggest adding * chore: support URL object on `site` * docs: add await to pagesGlob ex * docs: tighten `rssSchema` explainer * docs: tighten pagesGlobToRssItems section * docs: add content to README * docs: replace examples with docs link * docs: re-we Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Diffstat (limited to 'examples/blog/src/pages/rss.xml.js')
-rw-r--r--examples/blog/src/pages/rss.xml.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/blog/src/pages/rss.xml.js b/examples/blog/src/pages/rss.xml.js
index 3997cc45e..7d054b92a 100644
--- a/examples/blog/src/pages/rss.xml.js
+++ b/examples/blog/src/pages/rss.xml.js
@@ -7,7 +7,7 @@ export async function get(context) {
return rss({
title: SITE_TITLE,
description: SITE_DESCRIPTION,
- site: context.site.href,
+ site: context.site,
items: posts.map((post) => ({
...post.data,
link: `/blog/${post.slug}/`,