content: Fix archetype lookup order

Closes #3240

Co-authored-by: Sardorbek Imomaliev <3041675+imomaliev@users.noreply.github.com>
Co-authored-by: Michael Henderson <mdhender@mdhender.com>
This commit is contained in:
Joe Mooring
2025-11-01 12:19:07 -07:00
committed by GitHub
parent 9f79bacc41
commit 58654c1068
+2 -2
View File
@@ -44,7 +44,7 @@ archetypes/
Hugo looks for archetypes in the `archetypes` directory in the root of your project, falling back to the `archetypes` directory in themes or installed modules. An archetype for a specific content type takes precedence over the default archetype.
For example, with this command:
For example, if you have enabled a theme named `my-theme` and you run this command:
```sh
hugo new content posts/my-first-post.md
@@ -53,8 +53,8 @@ hugo new content posts/my-first-post.md
The archetype lookup order is:
1. `archetypes/posts.md`
1. `archetypes/default.md`
1. `themes/my-theme/archetypes/posts.md`
1. `archetypes/default.md`
1. `themes/my-theme/archetypes/default.md`
If none of these exists, Hugo uses a built-in default archetype.