Could it be that Hugo stopped using archetypes from a theme module recently (somewhere in the past two months)? The call:
hugo new --kind blog some/path/to/title-of-blog
worked around 2 months ago, but not today (with 0.119.0 and 0.118.2).
Copying the archetypes over from the theme to the main site project gets it working again. there is a
archetypes/blog/index.md in the archetypes that should/did fit with
I also, because the documentation refers to it this way now, tried
hugo new content --kind blog some/path/to/title-of-blog without success.
It’s one of these “is it me or the system” questions
I am unable to reproduce the behavior as described.
I tested using the Ananke theme, but I vendored the module in order to add more archetypes.
I tested with archetypes for both regular pages and leaf bundles as described in the archetypes documentation.
To make sure we’re testing the same thing, what happens if you vendor the module?
I noticed this a little while ago, and was going to dig deeper, but I rebuilt the instance I use for Hugo builds, it worked properly. I am wondering if there some Go version / caching thing that involved in this
I don’t know if you (@davidsneighbour) have done a recent clone of your repository and cleared your cache, but that is where I would look, especially if vendoring works.
Thank you for that vendoring tip.
Turns out I forgot to add the archetypes to the module configuration. For some reasons, this worked until recently. I might have had some form of
replacement config going on before and that might have gotten stricter now (in sense of with replacement with a local repo the archetypes directory was there, with a “proper” module config it wasn’t really there because it wasn’t in the config… let’s not COD about this).
Thanks both of you for your checks.
PS: I am giving @cshoredaniel a solution tick because I don’t want to take that for myself and the topic wouldn’t close without it It was the right direction.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.