mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
Get rid of some viper.Get* calls
Enforce usage of PathSpec Fixes #3060 Updates #2728
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
3d4e99ed50
commit
7e0fa13faa
@@ -929,7 +929,7 @@ func (p *Page) URL() string {
|
||||
func (p *Page) RelPermalink() string {
|
||||
link := p.getPermalink()
|
||||
|
||||
if p.s.Cfg.GetBool("canonifyURLs") {
|
||||
if p.s.Info.canonifyURLs {
|
||||
// replacements for relpermalink with baseURL on the form http://myhost.com/sub/ will fail later on
|
||||
// have to return the URL relative from baseURL
|
||||
relpath, err := helpers.GetRelativePath(link.String(), string(p.Site.BaseURL))
|
||||
|
Reference in New Issue
Block a user