mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user