Since the archetype rework in 0.89 my hugo new throws (various differing) errors.
The archetype (in archetypes/blog/index.md):
+++
title = "{{ replace .Name "-" " " | title }}"
linkTitle = "{{ replace .Name "-" " " | title }}"
# used for SEO description, should not go over 180 characters
description = ""
# used for the preview of the post on list pages
# if missing or empty the automatic excerpt is used
summary = ""
# dates
date = {{ .Date }}
publishDate = {{ .Date }}
lastmod = {{ .Date }}
# add multiple resources to create a slider gallery
[[resources]]
title = "Photo by [Ave Calvar](https://unsplash.com/@shotbyrain) via [Unsplash](https://unsplash.com/s/photos/horizon)"
name = "image name if other than src"
src = "ave-calvar-HcUDHJfd5GY-unsplash.jpg"
# remove the author section to use the sites author setup
[author]
name = "Patrick Kollitsch"
homepage = "https://kollitsch.de/"
image = "/images/patrick-kollitsch.jpg"
email = "patrick@kollitsch.de"
# taxonomification
categories = [
"category1"
]
tags = [
"tag1",
"tag2"
]
keywords = [
"keyword1",
"keyword2"
]
+++
with GoHugo 0.89.0:
patrick@main:~/Projects/dnb-org/kollitsch.de$ hugo new blog/2021/hyper-shell
Error: mkdir /tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/dnb-org/libraries/heroicons@v1.0.3/content/blog: permission denied
(note, that GoHugo tries to create the post inside of a module-cache)
with GoHugo 0.89.2:
patrick@main:~/Projects/dnb-org/kollitsch.de$ hugo new blog/2021/hyper-shell
Error: open : no such file or directory
with GoHugo 0.89.3:
patrick@main:~/Projects/dnb-org/kollitsch.de$ hugo new blog/2021/hyper-shell
Error: could not determine content directory for "blog/2021/hyper-shell"
downgrading to GoHugo 0.88.1 solves the issue and the post is created.
patrick@main:~/Projects/dnb-org/kollitsch.de$ hugo new blog/2021/hyper-shell
/home/patrick/Projects/dnb-org/kollitsch.de/content/blog/2021/hyper-shell created
Once I figured out you were using things like archetypes/default/index.md instead of archetypes/default.md I tried:
hugo new /blog/2021/hyper-shell/index.md
and got
WARN 2021/11/16 12:44:34 Module "github.com/dnb-org/components/functions" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN 2021/11/16 12:44:34 Module "github.com/dnb-org/components/giscus" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN 2021/11/16 12:44:34 Module "github.com/dnb-org/components/netlification" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN 2021/11/16 12:44:34 Module "github.com/dnb-org/shortcodes/collection" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN 2021/11/16 12:44:34 Module "github.com/dnb-org/shortcodes/youtube" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN 2021/11/16 12:44:34 Module "github.com/dnb-org/shortcodes/pictures" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Error: from config: failed to resolve output format "security" from site config
It looks to me like the use of directories for config and archetypes is confusing the new archetype code.
Oh, hugo version: hugo v0.89.3-C88CDB56 linux/amd64 BuildDate=2021-11-15T12:17:46Z VendorInfo=gohugoio
Scratch that; it’s occurring for me independent of use of directories for archetypes and config. (But haven’t yet got a public repo to show).