Before, .Site.GetPage "/news"
would only find /news
. With 0.126.3, I notice that it also returns /tags/news
.
Was this change introduced on purpose? If so, what is the correct way of asking “Does this page exist at the exact location /x/y/z”?
Before, .Site.GetPage "/news"
would only find /news
. With 0.126.3, I notice that it also returns /tags/news
.
Was this change introduced on purpose? If so, what is the correct way of asking “Does this page exist at the exact location /x/y/z”?
We unified/simplified the code in (I think) 0.123.0. We have always had a fall back to the “short name”, e.g. site.GetPage "mypost"
would return /mysection/mypost.md
, assuming there’s only one page with that base name.
I assume that in your case there is no /news
page, so we fall back to the “short lookup”.
But I’m a little bit surprised about your case above, and would call that a bug. Any lookups with a leading /
should not trigger a “short lookup”
EDIT IN: I think the above change came with the content adapters in Hugo 0.126.0, but still a bug.
Thank you very much for the point release!
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.