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
This commit is contained in:
Bjørn Erik Pedersen
2021-11-08 11:50:51 +01:00
parent c09f5c5fd3
commit 2b01c85d14
3 changed files with 26 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ import (
)
// TODO(bep) clean this up. Export the test site builder in Hugolib or something.
func TestNewContent(t *testing.T) {
func TestNewContentFromFile(t *testing.T) {
cases := []struct {
name string
kind string