mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
parent
6f48146e75
commit
1746e8a9b2
4 changed files with 31 additions and 6 deletions
|
@ -940,6 +940,8 @@ func setupLinkingMockSite(t *testing.T) *Site {
|
|||
{filepath.FromSlash("level2/level3/common.png"), ""},
|
||||
|
||||
{filepath.FromSlash("level2/level3/embedded.dot.md"), ""},
|
||||
|
||||
{filepath.FromSlash("leafbundle/index.md"), ""},
|
||||
}
|
||||
|
||||
cfg, fs := newTestCfg()
|
||||
|
@ -1026,3 +1028,18 @@ func checkLinkCase(site *Site, link string, currentPage page.Page, relative bool
|
|||
t.Fatalf("[%d] Expected %q from %q to resolve to %q, got %q - error: %s", i, link, currentPage.Path(), expected, out, err)
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/6952
|
||||
func TestRefBundle(t *testing.T) {
|
||||
b := newTestSitesBuilder(t)
|
||||
b.WithContent(
|
||||
"post/b1/index.md", "---\ntitle: pb1\n---\nRef: {{< ref \"b2\" >}}",
|
||||
"post/b2/index.md", "---\ntitle: pb2\n---\n",
|
||||
)
|
||||
b.WithTemplates("index.html", `Home`)
|
||||
b.WithTemplates("_default/single.html", `Content: {{ .Content }}`)
|
||||
|
||||
b.Build(BuildCfg{})
|
||||
|
||||
b.AssertFileContent("public/post/b1/index.html", `Content: <p>Ref: http://example.com/post/b2/</p>`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue