30 lines
822 B
Plaintext
30 lines
822 B
Plaintext
---
|
|
import { l, t, astroI18n } from "astro-i18n";
|
|
import { log } from "astro/dist/core/logger/core";
|
|
import { literal } from "astro/zod";
|
|
astroI18n.init(Astro);
|
|
|
|
import { getCollection } from "astro:content";
|
|
import EditorialContent from "../../components/EditorialContent.astro";
|
|
import TOC from "../../components/TOC.astro";
|
|
|
|
import BaseLayout from "../../layouts/BaseLayout.astro";
|
|
|
|
export async function getStaticPaths() {
|
|
const articles = await getCollection("articles", ({ data }) => {
|
|
return data.lang === astroI18n.langCode;
|
|
});
|
|
return articles.map((article) => ({
|
|
// temp 'split' workaround for i18n
|
|
params: { slug: article.data.slug },
|
|
props: { article },
|
|
}));
|
|
}
|
|
|
|
const { article } = Astro.props;
|
|
---
|
|
|
|
<BaseLayout pageTitle={article.data.title}>
|
|
<EditorialContent content={article} />
|
|
</BaseLayout>
|