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 /source/content_directory_test.go | |
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 'source/content_directory_test.go')
-rw-r--r-- | source/content_directory_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/content_directory_test.go b/source/content_directory_test.go index d3723c6b1..8f1d0df4f 100644 --- a/source/content_directory_test.go +++ b/source/content_directory_test.go @@ -57,7 +57,7 @@ func TestIgnoreDotFilesAndDirectories(t *testing.T) { ps, err := helpers.NewPathSpec(fs, v, nil) c.Assert(err, qt.IsNil) - s := NewSourceSpec(ps, fs.Source) + s := NewSourceSpec(ps, nil, fs.Source) if ignored := s.IgnoreFile(filepath.FromSlash(test.path)); test.ignore != ignored { t.Errorf("[%d] File not ignored", i) |