diff --git a/archetypes/default.md b/archetypes/default.md index 88fb308b..0b914787 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,10 +1,11 @@ +{{- $now := now -}} +++ categories = [] date = "{{ .Date }}" description = "" draft = true -id = "{{ print .File.Path now.UnixNano | sha1 }}" +id = "{{ print .File.Path $now.UnixNano | sha1 }}" link = "" tags = [] -title = "{{ replace .Name "-" " " | title }}" +title = "{{ replace (strings.TrimPrefix (print ($now.Format `2006-01-02`) `-`) .Name) `-` ` ` | title }}" +++