Commit graph

3 commits

Author SHA1 Message Date
Cathrine Paulsen 61cf3c9f63 Fix and refactor typos 2022-03-14 19:39:07 +01:00
Bjørn Erik Pedersen 2b01c85d14 Fix path resolution in hugo new
With theme and project with content directories and command on the form `hugo new posts/test.md`.

Fixes #9129
2021-11-08 14:10:46 +01:00
Bjørn Erik Pedersen 9185e11eff 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
2021-10-16 15:22:03 +02:00