Upgrade Astro and Astro Paper to v5
This commit is contained in:
parent
8ebf7d5996
commit
e719f7ccca
105 changed files with 7099 additions and 1939 deletions
|
@ -1,7 +1,7 @@
|
|||
import rss from "@astrojs/rss";
|
||||
import { getCollection } from "astro:content";
|
||||
import getSortedPosts from "@utils/getSortedPosts";
|
||||
import { SITE } from "@config";
|
||||
import getSortedPosts from "@/utils/getSortedPosts";
|
||||
import { SITE } from "@/config";
|
||||
|
||||
export async function GET() {
|
||||
const posts = await getCollection("blog");
|
||||
|
@ -10,8 +10,8 @@ export async function GET() {
|
|||
title: SITE.title,
|
||||
description: SITE.desc,
|
||||
site: SITE.website,
|
||||
items: sortedPosts.map(({ data, slug }) => ({
|
||||
link: `posts/${slug}/`,
|
||||
items: sortedPosts.map(({ data, id }) => ({
|
||||
link: `posts/${id}/`,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
pubDate: new Date(data.modDatetime ?? data.pubDatetime),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue