From c6a8f3e613d20323e845b40dd87648eb3b79421a Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 15 Oct 2021 02:25:54 -0400 Subject: fix post archetype --- themes/hugo-pt2021/archetypes/posts.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'themes') diff --git a/themes/hugo-pt2021/archetypes/posts.md b/themes/hugo-pt2021/archetypes/posts.md index 9b527d6..c486240 100644 --- a/themes/hugo-pt2021/archetypes/posts.md +++ b/themes/hugo-pt2021/archetypes/posts.md @@ -1,7 +1,8 @@ +{{- $slug := substr .Name 11 -}} --- -slug: {{.Name}} -title: "{{ replace .Name "-" " " | title }}" -date: "{{now}}" +slug: {{$slug}} +title: "{{ replace $slug "-" " " | title }}" +date: "{{now.Format "2006-01-02T15:04:05"}}{{default "Z" .Site.Params.tz}}" draft: true --- -Longer description of {{.Name}} +Contents of {{$slug}}. -- cgit v1.2.3