Sveltia: S3 string widget + disqus field + archetypes templates
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
title = '{{ replace .Name "-" " " | title }}'
|
||||
slug = '{{ .Name }}'
|
||||
date = "{{ .Date | dateFormat "2006-01-02T00:00:00" }}"
|
||||
description = ''
|
||||
+++
|
||||
@@ -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
|
||||
+++
|
||||
Текст поездки.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
{{< rawhtml >}}
|
||||
{{< back-to-top >}}
|
||||
{{< /rawhtml >}}
|
||||
+32
-8
@@ -22,8 +22,16 @@ collections:
|
||||
extension: md
|
||||
summary: '{{title}} — {{date}}'
|
||||
fields:
|
||||
- { label: Заголовок, name: title, widget: string }
|
||||
- { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов. Пример: paris-2025' }
|
||||
- label: Заголовок
|
||||
name: title
|
||||
widget: string
|
||||
hint: 'Например: Коломна или Дюкинский заказник'
|
||||
|
||||
- label: Slug (URL)
|
||||
name: slug
|
||||
widget: string
|
||||
hint: 'Латиница без пробелов. Пример: Kolomna или Dukyn2504'
|
||||
|
||||
- label: Дата
|
||||
name: date
|
||||
widget: datetime
|
||||
@@ -31,13 +39,29 @@ collections:
|
||||
date_format: 'DD.MM.YYYY'
|
||||
time_format: 'HH:mm'
|
||||
default: ''
|
||||
- { label: Описание (анонс), name: description, widget: string }
|
||||
- label: Обложка
|
||||
|
||||
- label: Описание (анонс)
|
||||
name: description
|
||||
widget: string
|
||||
hint: 'Короткая фраза. Пример: скалы, рассвет, однодневная поездка'
|
||||
|
||||
- label: Обложка (S3 URL)
|
||||
name: image
|
||||
widget: image
|
||||
widget: string
|
||||
required: false
|
||||
hint: 'Загрузи фото или оставь пустым'
|
||||
- { label: Контент, name: body, widget: markdown }
|
||||
hint: 'https://s3.regru.cloud/sleeptrip-dev/images/ИМЯ_1.jpg'
|
||||
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
|
||||
label: 📝 Заметки
|
||||
@@ -49,7 +73,7 @@ collections:
|
||||
summary: '{{title}} — {{date}}'
|
||||
fields:
|
||||
- { label: Заголовок, name: title, widget: string }
|
||||
- { label: Slug (URL), name: slug, widget: string, hint: 'Латиница, без пробелов.' }
|
||||
- { label: Slug (URL), name: slug, widget: string, hint: 'Латиница без пробелов' }
|
||||
- label: Дата
|
||||
name: date
|
||||
widget: datetime
|
||||
|
||||
Reference in New Issue
Block a user