diff options
author | Bjørn Erik Pedersen <[email protected]> | 2021-10-13 08:12:06 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-10-16 15:22:03 +0200 |
commit | 9185e11effa682ea1ef7dc98f2943743671023a6 (patch) | |
tree | f89d4138ddffd163a2afcd814ed2c26d3c66c4c9 /langs | |
parent | 168a3aab4622786ccd0943137fce3912707f2a46 (diff) | |
download | hugo-9185e11effa682ea1ef7dc98f2943743671023a6.tar.gz hugo-9185e11effa682ea1ef7dc98f2943743671023a6.zip |
Reimplement archetypes
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.
This new implementation is using the exact same code path for evaluating the pages as in a regular build.
This also makes it more robust and easier to reason about in a multilingual setup.
Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:
```bash
hugo new content/en/posts/my-first-post.md
```
Fixes #9032
Fixes #7589
Fixes #9043
Fixes #9046
Fixes #9047
Diffstat (limited to 'langs')
-rw-r--r-- | langs/i18n/translationProvider.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/langs/i18n/translationProvider.go b/langs/i18n/translationProvider.go index e8bfbf6f1..9e82b18d9 100644 --- a/langs/i18n/translationProvider.go +++ b/langs/i18n/translationProvider.go @@ -46,7 +46,7 @@ func NewTranslationProvider() *TranslationProvider { // Update updates the i18n func in the provided Deps. func (tp *TranslationProvider) Update(d *deps.Deps) error { - spec := source.NewSourceSpec(d.PathSpec, nil) + spec := source.NewSourceSpec(d.PathSpec, nil, nil) bundle := i18n.NewBundle(language.English) bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal) |