Trim date from archetype title

This commit is contained in:
Will Faught
2023-09-23 12:58:50 -07:00
parent 47f9b70ca5
commit 373e8a7c5e

View File

@@ -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 }}"
+++