Skip to content

Commit

Permalink
Fixing typscript error in RSS feed
Browse files Browse the repository at this point in the history
  • Loading branch information
matttrent committed Dec 14, 2024
1 parent 0688aa5 commit 8109de4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Other
- [x] Use astro image components (migrate PhD and MSc pages)
- [x] Transition notes from date to createdAt
- [ ] Add type to notes and allow grouping/filtering by type
- [ ] Add a notes RSS feed
- [x] Add a notes RSS feed
- [x] Add sitemap
- [ ] Migrate to server-side rendering provider

5 changes: 3 additions & 2 deletions src/pages/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import type { CollectionEntry } from 'astro:content';
import { experimental_AstroContainer as AstroContainer } from "astro/container";
import { getContainerRenderer as getMDXRenderer } from "@astrojs/mdx";
import { loadRenderers } from "astro:container";
import type { APIContext } from 'astro';


type Note = CollectionEntry<"notes">;


export async function GET(context) {
export async function GET(context: APIContext) {

const renderers = await loadRenderers([getMDXRenderer()]);
const container = await AstroContainer.create({ renderers });
Expand All @@ -34,7 +35,7 @@ export async function GET(context) {
return rss({
title: "matttrent.com notes feed",
description: "matttrent.com notes feed",
site: context.site,
site: context.site?.toString() ?? "",
trailingSlash: false,
items: items
});
Expand Down

0 comments on commit 8109de4

Please sign in to comment.