All checks were successful
Deploy / deploy (push) Successful in 49s
- German (default) and English i18n support - Categories and tags - Blog posts with hero images - Dark/light theme switcher - View Transitions removed to fix reload ghost images - Webmentions integration - RSS feeds per locale Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
21 lines
522 B
Text
21 lines
522 B
Text
---
|
|
import { type CollectionEntry, render } from 'astro:content';
|
|
import Post from '~/layouts/Post.astro';
|
|
import { getPostsByLocale, postSlug } from '~/i18n/posts';
|
|
|
|
export async function getStaticPaths() {
|
|
const posts = await getPostsByLocale('en');
|
|
return posts.map((post) => ({
|
|
params: { slug: postSlug(post) },
|
|
props: post,
|
|
}));
|
|
}
|
|
type Props = CollectionEntry<'posts'>;
|
|
|
|
const post = Astro.props;
|
|
const { Content } = await render(post);
|
|
---
|
|
|
|
<Post {...post.data} locale="en" entry={post}>
|
|
<Content />
|
|
</Post>
|