Sveltia: S3 string widget + disqus field + archetypes templates

This commit is contained in:
Telegram Bot
2026-04-29 00:59:54 +03:00
parent 6731496f7a
commit d857400988
3 changed files with 55 additions and 8 deletions
+6
View File
@@ -0,0 +1,6 @@
+++
title = '{{ replace .Name "-" " " | title }}'
slug = '{{ .Name }}'
date = "{{ .Date | dateFormat "2006-01-02T00:00:00" }}"
description = ''
+++
+17
View File
@@ -0,0 +1,17 @@
+++
title = '{{ replace .Name "-" " " | title }}'
slug = '{{ .Name }}'
image = "https://s3.regru.cloud/sleeptrip-dev/images/{{ .Name }}_1.jpg"
date = "{{ .Date | dateFormat "2006-01-02T00:00:00" }}"
description = ''
disqus_identifier = 0
+++
Текст поездки.
![{{ .Name }}](https://s3.regru.cloud/sleeptrip-dev/images/{{ .Name }}_2.jpg)
![{{ .Name }}](https://s3.regru.cloud/sleeptrip-dev/images/{{ .Name }}_3.jpg)
{{< rawhtml >}}
{{< back-to-top >}}
{{< /rawhtml >}}
+32 -8
View File
@@ -22,8 +22,16 @@ collections:
extension: md extension: md
summary: '{{title}} — {{date}}' summary: '{{title}} — {{date}}'
fields: fields:
- { label: Заголовок, name: title, widget: string } - label: Заголовок
- { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов. Пример: paris-2025' } name: title
widget: string
hint: 'Например: Коломна или Дюкинский заказник'
- label: Slug (URL)
name: slug
widget: string
hint: 'Латиница без пробелов. Пример: Kolomna или Dukyn2504'
- label: Дата - label: Дата
name: date name: date
widget: datetime widget: datetime
@@ -31,13 +39,29 @@ collections:
date_format: 'DD.MM.YYYY' date_format: 'DD.MM.YYYY'
time_format: 'HH:mm' time_format: 'HH:mm'
default: '' default: ''
- { label: Описание (анонс), name: description, widget: string }
- label: Обложка - label: Описание (анонс)
name: description
widget: string
hint: 'Короткая фраза. Пример: скалы, рассвет, однодневная поездка'
- label: Обложка (S3 URL)
name: image name: image
widget: image widget: string
required: false required: false
hint: 'Загрузи фото или оставь пустым' hint: 'https://s3.regru.cloud/sleeptrip-dev/images/ИМЯ_1.jpg'
- { label: Контент, name: body, widget: markdown } pattern: ['^https?://', 'Должен быть полный URL']
- label: Disqus ID
name: disqus_identifier
widget: number
value_type: int
hint: 'Следующий свободный: 134. Каждый пост — уникальный номер.'
min: 1
- label: Контент
name: body
widget: markdown
- name: notes - name: notes
label: 📝 Заметки label: 📝 Заметки
@@ -49,7 +73,7 @@ collections:
summary: '{{title}} — {{date}}' summary: '{{title}} — {{date}}'
fields: fields:
- { label: Заголовок, name: title, widget: string } - { label: Заголовок, name: title, widget: string }
- { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов.' } - { label: Slug (URL), name: slug, widget: string, hint: 'Латиница без пробелов' }
- label: Дата - label: Дата
name: date name: date
widget: datetime widget: datetime