39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
---
|
|
import EditionLayout from "../../layouts/EditionLayout.astro";
|
|
import { getCollection } from "astro:content";
|
|
import EditionToc from "../../components/EditionToc.astro";
|
|
import LocalToc from "../../components/LocalToc.astro";
|
|
|
|
export async function getStaticPaths() {
|
|
const entries = (await getCollection("archicratie"))
|
|
.filter((e) => e.slug.startsWith("archicrat-ia/"));
|
|
|
|
return entries.map((entry) => ({
|
|
// ✅ inline : jamais de helper externe (évite "stripPrefix is not defined")
|
|
params: { slug: entry.slug.replace(/^archicrat-ia\//, "") },
|
|
props: { entry },
|
|
}));
|
|
}
|
|
|
|
const { entry } = Astro.props;
|
|
const { Content, headings } = await entry.render();
|
|
---
|
|
|
|
<EditionLayout
|
|
title={entry.data.title}
|
|
editionLabel="Essai-thèse"
|
|
editionKey="archicrat-ia"
|
|
statusLabel="essai-thèse"
|
|
statusKey="essai_these"
|
|
level={entry.data.level}
|
|
version={entry.data.version}
|
|
>
|
|
<Fragment slot="aside">
|
|
<EditionToc currentSlug={entry.slug} />
|
|
<LocalToc headings={headings} />
|
|
</Fragment>
|
|
|
|
<h1>{entry.data.title}</h1>
|
|
<Content />
|
|
</EditionLayout>
|