diff --git a/archetypes/default.md b/archetypes/blog.md similarity index 65% rename from archetypes/default.md rename to archetypes/blog.md index c6f3fce..12a0131 100644 --- a/archetypes/default.md +++ b/archetypes/blog.md @@ -1,5 +1,5 @@ +++ title = '{{ replace .File.ContentBaseName "-" " " | title }}' -date = {{ .Date }} +date = {{ dateFormat "2006-01-02" .Date }} draft = true +++ diff --git a/hugo.toml b/hugo.toml index c3a5728..2ee43ff 100644 --- a/hugo.toml +++ b/hugo.toml @@ -5,7 +5,7 @@ author = 'Adam Gausmann' theme = 'hugo-bearblog' enableRobotsTXT = true -dateFormat = '1970-01-01' +dateFormat = '2006-01-02' [params] title = 'gaussian.dev' diff --git a/justfile b/justfile index d9de2a1..6d821f8 100644 --- a/justfile +++ b/justfile @@ -3,6 +3,9 @@ build: dev: hugo --buildDrafts --buildFuture server + +post filename: + hugo new blog/$(date +%Y/%m/%d)/{{filename}}.md publish: build neocities push --prune public