Hugo caching old archetypes

I updated my theme’s default archetype (/archetypes/ but when I run hugo new foo/ then I still get my previous default archetype. Is there a cache somewhere that I can clear so that hugo picks up my new default archetype?

No cache.

What possible reasons would make hugo pick up my previous default archetype?

Could it be possible your Emacs-like text editor leaves some backup files around that confuse Hugo?

(Wild guess.)

Good guess but I just listed in the terminal and only have “

I started completely new hugo project from scratch. When it came time to create my first page on my new project (via hugo new it used the cached archetype from my other project located in a completely separate directory! This is totally bizarre. I even looked for any possible cache folder in my home directory but did not find a ~/.hugo folder or anything.

I am completely confused by this behaviour.

This shouldn’t be possible. The code here is pretty straightforward. It
only looks in two places. $CWD/archetypes and theme/archetypes.

Perhaps it pulled it from a theme?

I’m dumbfounded by this also. I do not have an archetypes folder setup in my project. I only have a default one in my theme, themes/black/archetypes/ with these contents:

CoverImage: cover-900x477.jpg
CoverImageType: image/jpeg
CoverImageWidth: 900
CoverImageHeight: 477
 - Test
 - Test

Note: The directory themes/black is a git submodule (if that gives any clues)

My first hugo project has a project file structure laid out the same way and the default archetype looked like this:

Categories = ["Test"]
CoverImage = "cover.jpg"
CoverImageHeight = 477
CoverImageType = "image/jpeg"
CoverImageWidth = 900
Tags = ["Test"]


^ This is the default archetype I am receiving in my brand new project and still in my old project. I ignored the issue on my original project because I thought it was just a cache issue somewhere but now I’m stumped as to why this carried over to my new project. My old project has also been updated to a similar yaml archetype that no longer uses toml style front matter.

For a little sanity check, I moved my archetypes directory to another location on my disk. When I ran hugo new it gave me this error:

ERROR: 2015/10/03 Unable to find archetypes directory for theme : black in /Users/glitchesnetwork/Sites/.../blog-hugo/themes/black/archetypes

So obviously it is looking at that file but it doesn’t care what’s in it?

Were you able to resolve this? I have a similar issue.

Edit: my issue was resolved by explicitly setting the theme: hugo new --theme=pasture notes/