summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-24 11:52:25 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-24 11:52:25 +0200
commit369744845046e1aa54205ef4a5dceae0829f8331 (patch)
tree3e6cf59aa176e1ecd9b7a7416bd11f5f68437d76 /docs/content
parent2638b04c6246a34b18073652f1120d799eb0a481 (diff)
docs: Document directory based archetypes
See #4535
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/en/content-management/archetypes.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/content/en/content-management/archetypes.md b/docs/content/en/content-management/archetypes.md
index ff4a2d783..3fc8a9f3f 100644
--- a/docs/content/en/content-management/archetypes.md
+++ b/docs/content/en/content-management/archetypes.md
@@ -70,6 +70,28 @@ It will create a new newsletter type of content file based on the archetype temp
The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo&#39;s template funcs can be used in the archetype file.
+## Directory based archetypes
+
+Since Hugo `0.49` you can use complete directories as archetype templates. Given this archetype directory:
+
+```bash
+archetypes
+├── default.md
+└── post-bundle
+ ├── bio.md
+ ├── images
+ │ └── featured.jpg
+ └── index.md
+```
+
+```bash
+hugo new --kind post-bundle post/my-post
+```
+
+Will create a new folder in `/content/post/my-post` with the same set of files as in the `post-bundle` archetypes folder. All content files (`index.md` etc.) can contain template logic, and will receive the correct `.Site` for the content's language.
+
+
+
[archetypes directory]: /getting-started/directory-structure/
[content types]: /content-management/types/
[front matter]: /content-management/front-matter/