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
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:
parent
f3c7132044
commit
76dee1b074
93 changed files with 293 additions and 506 deletions
|
|
@ -11,7 +11,7 @@ tabs:
|
|||
type: fields
|
||||
fields:
|
||||
blueprint: fields/blueprint
|
||||
text:
|
||||
body:
|
||||
label: Contenu
|
||||
type: blocks
|
||||
fieldsets:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ tabs:
|
|||
label: Image de couverture
|
||||
type: files
|
||||
multiple: false
|
||||
text:
|
||||
body:
|
||||
label: Contenu
|
||||
type: blocks
|
||||
fieldsets:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ tabs:
|
|||
text: "{{ file.coverLabel }}"
|
||||
multiple: false
|
||||
width: 1/2
|
||||
introduction:
|
||||
intro:
|
||||
label: Introduction
|
||||
type: writer
|
||||
parts:
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue