aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/micro
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-08-13 20:24:43 -0700
committerPinapelz <yukais@pinapelz.com>2026-08-13 20:24:43 -0700
commit6bd7c45dd6c477c2f288a26f9dddcaff6b14d73e (patch)
tree98e85a5d1dd0f97a7aa300582f924a4f9d76b3ad /src/pages/micro
parentb913e45faa5b9c4d78f1b575818a7e96b8678ce8 (diff)
migrate codebase to astro blog v7
Diffstat (limited to 'src/pages/micro')
-rw-r--r--src/pages/micro/[...slug].astro6
-rw-r--r--src/pages/micro/index.astro2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pages/micro/[...slug].astro b/src/pages/micro/[...slug].astro
index 0ad6f8b..099d78f 100644
--- a/src/pages/micro/[...slug].astro
+++ b/src/pages/micro/[...slug].astro
@@ -1,18 +1,18 @@
---
-import { CollectionEntry, getCollection } from 'astro:content';
+import { CollectionEntry, getCollection, render } from 'astro:content';
import BlogPost from '../../layouts/BlogPost.astro';
export async function getStaticPaths() {
const posts = await getCollection('micro');
return posts.map((post) => ({
- params: { slug: post.slug },
+ params: { slug: post.id },
props: post,
}));
}
type Props = CollectionEntry<'micro'>;
const post = Astro.props;
-const { Content } = await post.render();
+const { Content } = await render(post);
---
<BlogPost {...post.data}>
diff --git a/src/pages/micro/index.astro b/src/pages/micro/index.astro
index 7393216..1abc9df 100644
--- a/src/pages/micro/index.astro
+++ b/src/pages/micro/index.astro
@@ -42,7 +42,7 @@ const posts = (await getCollection('micro')).sort(
posts.map((post) => (
<li>
<FormattedDate date={post.data.pubDate} />
- <a href={`/micro/${post.slug}/`}>{post.data.title}</a>
+ <a href={`/micro/${post.id}/`}>{post.data.title}</a>
</li>
))
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage