Skip to content

Commit fa90ec8

Browse files
committed
Fix a typo in file name
1 parent f1a6452 commit fa90ec8

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import starlight from "@astrojs/starlight";
44
import partytown from "@astrojs/partytown";
55
import compress from "astro-compress";
66
import robotsTxt from "astro-robots-txt";
7-
import { BLOG_URL } from "./src/contants";
7+
import { BLOG_URL } from "./src/constants";
88
import tailwind from "@astrojs/tailwind";
99

1010
// https://astro.build/config
File renamed without changes.

src/pages/rss.xml.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ import type { APIRoute } from "astro";
33
import { getCollection } from "astro:content";
44
import MarkdownIt from "markdown-it";
55
import sanitizeHtml from "sanitize-html";
6-
import { BLOG_DESCRIPTION, BLOG_TITLE } from "../contants";
6+
import { BLOG_DESCRIPTION, BLOG_TITLE } from "../constants";
77
const parser = new MarkdownIt();
88

99
export const GET: APIRoute = async (context) => {
10-
const posts = await getCollection("docs");
11-
12-
return rss({
13-
title: BLOG_TITLE,
14-
description: BLOG_DESCRIPTION,
15-
site: context.site!,
16-
items: posts.map((post) => ({
17-
...post.data,
18-
pubDate: post.data.date ?? new Date('2024-01-07'),
19-
link: post.slug === 'index' ? '/' : `/${post.slug}/`,
20-
content: sanitizeHtml(parser.render(post.body)),
21-
...post.data,
22-
})),
23-
stylesheet: '/rss/pretty-feed-v3.xsl',
24-
});
25-
}
10+
const posts = await getCollection("docs");
11+
12+
return rss({
13+
title: BLOG_TITLE,
14+
description: BLOG_DESCRIPTION,
15+
site: context.site!,
16+
items: posts.map((post) => ({
17+
...post.data,
18+
pubDate: post.data.date ?? new Date("2024-01-07"),
19+
link: post.slug === "index" ? "/" : `/${post.slug}/`,
20+
content: sanitizeHtml(parser.render(post.body)),
21+
...post.data,
22+
})),
23+
stylesheet: "/rss/pretty-feed-v3.xsl",
24+
});
25+
};

0 commit comments

Comments
 (0)