refactor(editorial): recentrer le site sur le noyau archicratique
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
const { currentSlug } = Astro.props;
|
||||
const {
|
||||
currentSlug,
|
||||
collection = "archicrat-ia",
|
||||
basePath = "/archicrat-ia",
|
||||
label = "Table des matières"
|
||||
} = Astro.props;
|
||||
|
||||
// ✅ Après migration : TOC = collection "archicrat-ia"
|
||||
const entries = (await getCollection("archicrat-ia"))
|
||||
const entries = (await getCollection(collection))
|
||||
.sort((a, b) => (a.data.order ?? 0) - (b.data.order ?? 0));
|
||||
|
||||
const href = (slug) => `/archicrat-ia/${slug}/`;
|
||||
const href = (slug) => `${basePath}/${slug}/`;
|
||||
---
|
||||
|
||||
<nav class="toc-global" aria-label="Table des matières — ArchiCraT-IA">
|
||||
<nav class="toc-global" aria-label={label}>
|
||||
<div class="toc-global__head">
|
||||
<div class="toc-global__title">Table des matières</div>
|
||||
<div class="toc-global__title">{label}</div>
|
||||
</div>
|
||||
|
||||
<ol class="toc-global__list">
|
||||
|
||||
Reference in New Issue
Block a user