From 72be884fd41138298b1ac7f1bc554638f6b5ba95 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 9 Apr 2023 13:42:23 +0800 Subject: [PATCH] Update post archetype --- archetypes/post/index.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/archetypes/post/index.adoc b/archetypes/post/index.adoc index 3e231d6..9dea93c 100644 --- a/archetypes/post/index.adoc +++ b/archetypes/post/index.adoc @@ -1,9 +1,10 @@ +{{- $date := time.Format "2006-01-02" .Date }} --- -title: "{{ replace .Name "-" " " | humanize }}" -date: {{ .Date }} +title: "{{ strings.TrimPrefix $date .Name | replace "-" " " | humanize }}" +publishdate: {{ .Date }} --- = {{ replace .Name "-" " " | humanize }} Gabriel Arazas -{{ dateFormat "2006-01-02" .Date }} +{{ $date }}