Fix self-mounts on the main project

Fixes #6143
This commit is contained in:
Bjørn Erik Pedersen 2019-07-30 13:35:16 +02:00
parent 53ade40ba4
commit 36220851e4
3 changed files with 49 additions and 14 deletions

View file

@ -506,3 +506,31 @@ weight = 2
}
}
}
func TestMountsProject(t *testing.T) {
config := `
baseURL="https://example.org"
[module]
[[module.mounts]]
source="mycontent"
target="content"
`
b := newTestSitesBuilder(t).
WithConfigFile("toml", config).
WithSourceFile(filepath.Join("mycontent", "mypage.md"), `
---
title: "My Page"
---
`)
b.Build(BuildCfg{})
//helpers.PrintFs(b.H.Fs.Source, "public", os.Stdout)
b.AssertFileContent("public/mypage/index.html", "Permalink: https://example.org/mypage/")
}