Compare commits

...

2 Commits

Author SHA1 Message Date
a84ff80da0 activite: fix publishDate 2025-06-08 22:53:17 +02:00
dd8a6217bf admin: fix dates of created files 2025-06-08 22:52:45 +02:00
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
---
title: blah blah
expiryDate: 2025-07-16
publishDate: "{{now}}"
publishDate: 2025-06-08
type: autre
---
Super truc

View File

@ -18,14 +18,14 @@ collections:
widget: "string"
folder: "content/activite"
preview_path: "activite/{{slug}}"
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
slug: "{{fields.expiryDate}}-{{slug}}"
summary: "{{expiryDate}} {{title}} ({{type}})"
sortable_fields: ["expiryDate", "type", "title"]
create: true
fields:
- { label: "Titre", name: "title", widget: "string" }
- { label: "Date", name: "expiryDate", widget: "datetime", date_format: "YYYY-MM-DD" }
- { label: "Date publication", name: "publishDate", widget: "hidden", default: "{{now}}" }
- { label: "Date publication", name: "publishDate", widget: "datetime", default: "{{now}}" }
- { label: "Type", name: "type", widget: "select", default: "autre", options: [ski, camp, AG, autre] }
- { label: "Contenu", name: "body", widget: "markdown", modes: [rich_text] }
@ -38,7 +38,7 @@ collections:
create: true
fields:
- { label: "Titre", name: "title", widget: "string" }
- { label: "Date", name: "date", widget: "datetime", date_format: "YYYY-MM-DD" }
- { label: "Date", name: "date", widget: "datetime", date_format: "YYYY-MM-DD", default: "{{now}}" }
- { label: "Date expiration", name: "expiryDate", widget: "datetime", date_format: "YYYY-MM-DD", required: false }
- { label: "Contenu", name: "body", widget: "markdown", modes: [rich_text] }