Sveltia: image widget + notes collection + field hints
This commit is contained in:
+37
-5
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user