From 6731496f7a1ef51122d3fd395d645fda86875f0a Mon Sep 17 00:00:00 2001 From: Telegram Bot Date: Wed, 29 Apr 2026 00:56:30 +0300 Subject: [PATCH] Sveltia: image widget + notes collection + field hints --- static/admin/config.yml | 42 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/static/admin/config.yml b/static/admin/config.yml index 3eec84a..e5ae283 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -12,17 +12,49 @@ public_folder: /images/uploads locale: ru collections: + - name: post - label: Посты / Поездки - label_singular: Пост + label: 🧳 Поездки + label_singular: Поездка folder: content/post create: true format: toml-frontmatter extension: md + summary: '{{title}} — {{date}}' fields: - { label: Заголовок, name: title, widget: string } - - { label: Slug (URL), name: slug, widget: string } - - { label: Дата, name: date, widget: datetime, format: 'YYYY-MM-DDTHH:mm:ss', default: '' } + - { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов. Пример: paris-2025' } + - label: Дата + name: date + widget: datetime + format: 'YYYY-MM-DDTHH:mm:ss' + date_format: 'DD.MM.YYYY' + time_format: 'HH:mm' + default: '' - { label: Описание (анонс), name: description, widget: string } - - { label: Обложка (URL из S3), name: image, widget: string, required: false } + - label: Обложка + name: image + widget: image + required: false + hint: 'Загрузи фото или оставь пустым' + - { label: Контент, name: body, widget: markdown } + + - name: notes + label: 📝 Заметки + label_singular: Заметка + folder: content/notes + create: true + format: toml-frontmatter + extension: md + summary: '{{title}} — {{date}}' + fields: + - { label: Заголовок, name: title, widget: string } + - { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов.' } + - label: Дата + name: date + widget: datetime + format: 'YYYY-MM-DDTHH:mm:ss' + date_format: 'DD.MM.YYYY' + time_format: 'HH:mm' + default: '' - { label: Контент, name: body, widget: markdown }