added featured_image support for page creation

This commit is contained in:
maximeg 2024-02-22 16:05:50 +01:00
parent 8068e4f253
commit 4cd1cd35df
2 changed files with 9 additions and 7 deletions

View file

@ -1,4 +0,0 @@
---
title: testpage2
---
page de test 2

View file

@ -21,12 +21,18 @@ collections:
summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
# adding a path object allows editing the path of entries # adding a path object allows editing the path of entries
# moving an existing entry will move the entire sub tree of the entry to the new location # moving an existing entry will move the entire sub tree of the entry to the new location
path: { widget: string, index_file: '{{fields.name}}' } path: '{{slug}}/index'
fields: fields:
- label: Title - label: Titre
name: title name: title
widget: string widget: string
- label: Body - label: Description
name: Description
widget: text
- label: Image de couverture
name: featured_image
widget: file
- label: Corps
name: body name: body
widget: markdown widget: markdown
# - label: 'Settings' # - label: 'Settings'