We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given that page /s2/p2 was created by a content adapter:
/s2/p2
{{ (site.GetPage "/s2/p2").Title }} --> p2 (pass) {{ (site.GetPage "p2").Title }} --> "" (fail)
In comparison, when /s1/p1 is backed by a file:
/s1/p1
{{ (site.GetPage "/s1/p1").Title }} --> p1 (pass) {{ (site.GetPage "p1").Title }} --> p1 (pass)
Test case:
func TestFoo(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- disableKinds = ['rss','section','sitemap','taxonomy','term'] -- layouts/index.html -- Test A: {{ (site.GetPage "/s1/p1").Title }} Test B: {{ (site.GetPage "p1").Title }} Test C: {{ (site.GetPage "/s2/p2").Title }} Test D: {{ (site.GetPage "p2").Title }} -- layouts/_default/single.html -- {{ .Title }} -- content/s1/p1.md -- --- title: p1 --- -- content/s2/_content.gotmpl -- {{ .AddPage (dict "path" "p2" "title" "p2") }} ` b := hugolib.Test(t, files) b.AssertFileExists("public/s1/p1/index.html", true) b.AssertFileExists("public/s2/p2/index.html", true) b.AssertFileContent("public/index.html", "Test A: p1", "Test B: p1", "Test C: p2", "Test D: p2", // fails ) }
Reference: https://discourse.gohugo.io/t/site-getpage-does-not-get-pages-created-with-an-adapter/50099/
The text was updated successfully, but these errors were encountered:
content adapter: Fix site.GetPage using the base part of the path
080439f
Fixes gohugoio#12561
917199a
Fixes #12561
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
bep
Successfully merging a pull request may close this issue.
Given that page
/s2/p2
was created by a content adapter:In comparison, when
/s1/p1
is backed by a file:Test case:
Reference: https://discourse.gohugo.io/t/site-getpage-does-not-get-pages-created-with-an-adapter/50099/
The text was updated successfully, but these errors were encountered: