Hello, here an “understanding” question:
reading layout lookup rules https://gohugo.io/templates/lookup-order/#examples-layout-lookup-for-regular-pages (section “single page in section with layout set”), why does it have that single.html.html
precedes demolayout.html
?
layouts/posts/demolayout.html.html
layouts/posts/single.html.html
layouts/posts/demolayout.html
layouts/posts/single.html
Does it break “most specific first” rule? Or is duplicate extension a way to additionally stratify the level of specificity?
Thanks!
pamubay
2
layouts/posts/single.html.html
actually:
layouts/posts/single.[outputFormat].[suffix]
HTML Output Format, has html
as suffix.
So yes it’s more specific than:
layouts/posts/demolayout.html
which translates to
layouts/posts/[layoutName].html
Nice Guide about template lookup order:
1 Like
Thanks @pamubay ! It clarifies things!
system
Closed
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.