fix: align content field names with blueprints, fix API field calls
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 21s

Content .txt files:
- narrative.txt (×4): Introduction → Intro
- chapter.txt (×3): Text → Body
- geoformat.txt: Intro → Text
- map.txt: move Text content into Intro field

narrative.json.php:
- parseChapter: $chapter->text() → $chapter->body()
- parseMarker: $marker->text() → $marker->body()
- parseMap: $map->text() → $map->intro()
- narrative root: $page->introduction() → $page->intro()

Also commits Kirby content directory rename (1_cohesion-des-mondes → cohesion-des-mondes)
and new _drafts content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-26 17:09:51 +01:00
parent f3c7132044
commit 76dee1b074
93 changed files with 293 additions and 506 deletions

View file

@ -11,7 +11,7 @@ tabs:
type: fields
fields:
blueprint: fields/blueprint
text:
body:
label: Contenu
type: blocks
fieldsets:

View file

@ -15,7 +15,7 @@ tabs:
label: Image de couverture
type: files
multiple: false
text:
body:
label: Contenu
type: blocks
fieldsets:

View file

@ -22,7 +22,7 @@ tabs:
text: "{{ file.coverLabel }}"
multiple: false
width: 1/2
introduction:
intro:
label: Introduction
type: writer
parts:

View file

@ -136,7 +136,7 @@ function parseChapter($chapter) {
'template' => 'chapter',
'title' => $chapter->title()->value(),
'slug' => $chapter->slug(),
'blocks' => parseBlocks($chapter->text(), $chapter)
'blocks' => parseBlocks($chapter->body(), $chapter)
];
}
@ -149,7 +149,7 @@ function parseMarker($marker) {
'cover' => resolveFileUrl($marker->cover(), $marker),
'icon' => $marker->markerIcon()->toFile() ? $marker->markerIcon()->toFile()->url() : null,
'iconSize' => $marker->markerIconSize()->value() ?? 40,
'blocks' => parseBlocks($marker->text(), $marker)
'blocks' => parseBlocks($marker->body(), $marker)
];
}
@ -172,7 +172,7 @@ function parseMap($map) {
'slug' => $map->slug(),
'tags' => $map->tags()->isNotEmpty() ? $map->tags()->split() : [],
'image' => $staticImage ? $staticImage->url() : null,
'intro' => resolveImagesInHtml($map->text()->value(), $map),
'intro' => resolveImagesInHtml($map->intro()->value(), $map),
'markers' => $markers
];
}
@ -214,7 +214,7 @@ $data = [
'slug' => $page->slug(),
'author' => $page->author()->value() ?? '',
'cover' => resolveFileUrl($page->cover(), $page),
'introduction' => resolveImagesInHtml($page->introduction()->value(), $page),
'introduction' => resolveImagesInHtml($page->intro()->value(), $page),
'customCss' => $page->customCss()->value() ?? '',
'modified' => $page->modified(),
'modifiedFormatted' => $page->modified('d/m/Y H:i'),