hugolib: Add relativeURLs and canonifyURLs to Site

This commit is contained in:
bogem
2017-02-20 13:52:06 +05:00
committed by Bjørn Erik Pedersen
parent c7535b9c25
commit 9e52477d94
2 changed files with 7 additions and 7 deletions

View File

@@ -940,8 +940,7 @@ func (p *Page) RelPermalink() string {
p.relPermalinkInit.Do(func() {
link := p.getPermalink()
if p.s.Info.canonifyURLs {
// replacements for relpermalink with baseURL on the form http://myhost.com/sub/ will fail later on
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))
if err != nil {