Bouton PDF par chapitre, badges morceaux améliorés, PDF configurable admin, git sync admin→prod
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Bouton PDF blanc par chapitre avec numéro de page (ChapterHeader) - Badges morceaux plus visibles (bordure, poids, hover) dans ChapterHeader et SongBadges - PDF viewer : page cible + panneau signets ouverts par défaut (BookPdfReader) - Config YAML : pdfFile dans book, chapterPages pour le mapping chapitre→page - Admin book : section PDF du livre avec chemin éditable et sauvegarde - Git sync automatique : chaque sauvegarde admin commit+push en prod (ADMIN_GIT_SYNC=true) - Docker : git installé en prod, volumes pour .git/site/content/public Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ export default defineEventHandler(async (event) => {
|
||||
const filePath = join(process.cwd(), 'content', 'book', `${slug}.md`)
|
||||
|
||||
await unlink(filePath)
|
||||
gitSyncContent(`Suppression chapitre ${slug}`, [`content/book/${slug}.md`])
|
||||
|
||||
return { ok: true }
|
||||
})
|
||||
|
||||
@@ -18,6 +18,7 @@ export default defineEventHandler(async (event) => {
|
||||
const content = `---\n${body.frontmatter.trim()}\n---\n${body.body}`
|
||||
|
||||
await writeFile(filePath, content, 'utf-8')
|
||||
gitSyncContent(`Mise à jour chapitre ${slug}`, [`content/book/${slug}.md`])
|
||||
|
||||
return { ok: true }
|
||||
})
|
||||
|
||||
@@ -24,6 +24,7 @@ readingTime: "5 min"
|
||||
`
|
||||
|
||||
await writeFile(filePath, content, 'utf-8')
|
||||
gitSyncContent(`Nouveau chapitre ${body.slug}`, [`content/book/${body.slug}.md`])
|
||||
|
||||
return { ok: true, slug: body.slug }
|
||||
})
|
||||
|
||||
@@ -25,5 +25,7 @@ export default defineEventHandler(async (event) => {
|
||||
}),
|
||||
)
|
||||
|
||||
gitSyncContent('Réorganisation chapitres', ['content/book/'])
|
||||
|
||||
return { ok: true }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user