mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 00:02:08 -05:00
hugolib: Only do page-relative getPage for relative paths
Updates #4969
This commit is contained in:
parent
6ffa882349
commit
501543d4b6
1 changed files with 2 additions and 4 deletions
|
@ -167,10 +167,8 @@ func (c *PageCollections) getPageNew(context *Page, ref string) (*Page, error) {
|
|||
if p, err := c.getFromCache(ref); err == nil && p != nil {
|
||||
return p, nil
|
||||
}
|
||||
}
|
||||
|
||||
// If there's a page context, try the page relative path.
|
||||
if context != nil {
|
||||
} else if context != nil {
|
||||
// Try the page-relative path.
|
||||
ppath := path.Join("/", strings.Join(context.sections, "/"), ref)
|
||||
if p, err := c.getFromCache(ppath); err == nil && p != nil {
|
||||
return p, nil
|
||||
|
|
Loading…
Reference in a new issue