Skip to content

Add archetype per language #5233

Open
Open
@bep

Description

@bep

Working with #4535 I noticed an issue with archetypes with multiple languages with each its own content directory. I will improve that "what site/language does this content belong to" logic, but to make it non-ambiguous, I will also add a (optional) --lang flag:

hugo new --lang=jp post/my-post.md

Doing that, it would also be good if each language could have its own set of archetype templates.

Since #4535 introduces a directory-based approach, we should probably prefix these to make them non-ambigous. My suggestion:

archetypes
├── _languages
│   └── jp
│       └── default.md
├── default.md
└── my-bundle
    ├── featured.png
    └── index.md

/cc @RickCogley @kaushalmodi @regisphilibert @spf13 @anthonyfok and gang.

Note that I plan to wrap this up fairly quickly and include this in a "Revival of The Archetypes #2" release on Monday. There is also the new slice related template funcs that, with Go 1.11, I think we should get out there sooner rather than later. So Monday it is.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions