Fix 404 chapitres : stem Nuxt Content inclut le dossier parent

Le `chapter.stem` de Nuxt Content renvoie `book/01-introduction` et non
`01-introduction`. Extraction du slug final via `.split('/').pop()` dans
les liens et la navigation prev/next.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-02-26 20:46:19 +01:00
parent 2f438d9d7a
commit dd1d8baf4f
3 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
<ul class="flex flex-col gap-1">
<li v-for="chapter in chapters" :key="chapter.path">
<NuxtLink
:to="`/modele-eco/${chapter.stem}`"
:to="`/modele-eco/${chapter.stem?.split('/').pop()}`"
class="flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors hover:bg-white/5"
active-class="bg-primary/10 text-primary font-medium"
>