From 4cd1cd35dfb779a810217c49a517cf3b7292a6b4 Mon Sep 17 00:00:00 2001 From: maximeg Date: Thu, 22 Feb 2024 16:05:50 +0100 Subject: [PATCH] added featured_image support for page creation --- content/pages/{{fields.name}}.md | 4 ---- static/admin/config.yml | 12 +++++++++--- 2 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 content/pages/{{fields.name}}.md diff --git a/content/pages/{{fields.name}}.md b/content/pages/{{fields.name}}.md deleted file mode 100644 index a4987a5..0000000 --- a/content/pages/{{fields.name}}.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: testpage2 ---- -page de test 2 diff --git a/static/admin/config.yml b/static/admin/config.yml index 7226648..a68c5b8 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -21,12 +21,18 @@ collections: summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field # 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 - path: { widget: string, index_file: '{{fields.name}}' } + path: '{{slug}}/index' fields: - - label: Title + - label: Titre name: title widget: string - - label: Body + - label: Description + name: Description + widget: text + - label: Image de couverture + name: featured_image + widget: file + - label: Corps name: body widget: markdown # - label: 'Settings'