Multilingual archetypes

It seems that there is no implementation yet for language-specific archetypes.

However

To use language-specific archetypes for a language you can do hugo new -k en/blog content/en/blog/my-new-post.md or hugo new -k sr/blog content/sr/blog/my-new-post.md and by including content in your path, the archetype will be interpolated and generated in the adequate folder. The archetypes folder should be structured as follows (in your example):

archetypes
├── en
│   ├── blog.md
│   ├── default.md
│   ├── faq.md
│   ├── series.md
│   └── tags.md
└── sr
    ├── blog.md
    ├── default.md
    ├── faq.md
    ├── series.md
    └── tags.md

It’s not elegant, but it works.

2 Likes