Get rid of some viper.Get* calls

Enforce usage of PathSpec

Fixes #3060
Updates #2728
This commit is contained in:
bogem
2017-02-20 03:53:48 +05:00
committed by Bjørn Erik Pedersen
parent 3d4e99ed50
commit 7e0fa13faa
3 changed files with 25 additions and 40 deletions

View File

@@ -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))