From 36220851e4ed7fc3fa78aa250d001d5f922210e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 30 Jul 2019 13:35:16 +0200 Subject: Fix self-mounts on the main project Fixes #6143 --- hugolib/hugo_modules_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'hugolib/hugo_modules_test.go') diff --git a/hugolib/hugo_modules_test.go b/hugolib/hugo_modules_test.go index 73a3d2db0..66b3609af 100644 --- a/hugolib/hugo_modules_test.go +++ b/hugolib/hugo_modules_test.go @@ -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/") +} -- cgit v1.2.3