Skip to content

Commit 932a5a9

Browse files
committed
content: update
1 parent cfe42e7 commit 932a5a9

35 files changed

+7
-7
lines changed

src/components/Header.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { SITE_TITLE } from "../consts";
99
<div class="internal-links">
1010
<HeaderLink href="/">主页</HeaderLink>
1111
<HeaderLink href="/blog">博文</HeaderLink>
12-
<HeaderLink href="/diary">日志</HeaderLink>
12+
<HeaderLink href="/xyy">逍遥游</HeaderLink>
1313
<HeaderLink href="/about">关于</HeaderLink>
1414
</div>
1515
<div class="social-links">

src/content/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const blog = defineCollection({
1313
}),
1414
});
1515

16-
const diary = defineCollection({
16+
const xyy = defineCollection({
1717
type: "content",
1818
// Type-check frontmatter using a schema
1919
schema: z.object({
@@ -25,4 +25,4 @@ const diary = defineCollection({
2525
heroImage: z.string().optional(),
2626
}),
2727
});
28-
export const collections = { blog, diary };
28+
export const collections = { blog, xyy };
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/pages/diary/[...slug].astro src/pages/xyy/[...slug].astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { type CollectionEntry, getCollection } from "astro:content";
33
import DiaryLayout from "../../layouts/DiaryLayout.astro";
44
55
export async function getStaticPaths() {
6-
const posts = await getCollection("diary");
6+
const posts = await getCollection("xyy");
77
return posts.map((post) => ({
88
params: { slug: post.slug },
99
props: post,
1010
}));
1111
}
12-
type Props = CollectionEntry<"diary">;
12+
type Props = CollectionEntry<"xyy">;
1313
1414
const post = Astro.props;
1515
const { Content } = await post.render();

src/pages/diary/index.astro src/pages/xyy/index.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts";
66
import { getCollection } from "astro:content";
77
import FormattedDate from "../../components/FormattedDate.astro";
88
9-
const posts = (await getCollection("diary")).sort(
9+
const posts = (await getCollection("xyy")).sort(
1010
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf(),
1111
);
1212
---
@@ -77,7 +77,7 @@ const posts = (await getCollection("diary")).sort(
7777
{
7878
posts.reverse().map((post) => (
7979
<li>
80-
<a href={`/diary/${post.slug}/`}>
80+
<a href={`/xyy/${post.slug}/`}>
8181
<h5 class="title">{post.data.title}</h5>
8282
<p class="date">
8383
<FormattedDate

0 commit comments

Comments
 (0)