Sveltia: image widget + notes collection + field hints
This commit is contained in:
+37
-5
@@ -12,17 +12,49 @@ public_folder: /images/uploads
|
|||||||
locale: ru
|
locale: ru
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
|
|
||||||
- name: post
|
- name: post
|
||||||
label: Посты / Поездки
|
label: 🧳 Поездки
|
||||||
label_singular: Пост
|
label_singular: Поездка
|
||||||
folder: content/post
|
folder: content/post
|
||||||
create: true
|
create: true
|
||||||
format: toml-frontmatter
|
format: toml-frontmatter
|
||||||
extension: md
|
extension: md
|
||||||
|
summary: '{{title}} — {{date}}'
|
||||||
fields:
|
fields:
|
||||||
- { label: Заголовок, name: title, widget: string }
|
- { label: Заголовок, name: title, widget: string }
|
||||||
- { label: Slug (URL), name: slug, widget: string }
|
- { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов. Пример: paris-2025' }
|
||||||
- { label: Дата, name: date, widget: datetime, format: 'YYYY-MM-DDTHH:mm:ss', default: '' }
|
- 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: Описание (анонс), 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 }
|
- { label: Контент, name: body, widget: markdown }
|
||||||
|
|||||||
Reference in New Issue
Block a user