From ea2450cb1588a5670998baa3197da7e01adc73dc Mon Sep 17 00:00:00 2001 From: maxime-cool Date: Mon, 15 Jan 2024 17:47:16 +0100 Subject: [PATCH] static config from eloi --- static/admin/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/static/admin/config.yml b/static/admin/config.yml index c0bcf36..e7c63c6 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -10,4 +10,12 @@ media_folder: "static/images/uploads" collections: - name: posts identifier_field: name - folder: _posts/blog \ No newline at end of file + folder: '_posts/blog' # The path to the folder where the documents are stored + slug: '{{year}}-{{month}}-{{day}}-{{slug}}' # Filename template, e.g., yyyy-MM-dd-title.md + fields: # The fields for each document, usually in front matter + - { label: 'Layout', name: 'layout', widget: 'hidden', default: 'blog' } + - { label: 'Title', name: 'title', widget: 'string' } + - { label: 'Publish Date', name: 'date', widget: 'datetime' } + - { label: 'Featured Image', name: 'thumbnail', widget: 'image' } + - { label: 'Rating (scale of 1-5)', name: 'rating', widget: 'number' } + - { label: 'Body', name: 'body', widget: 'markdown' }