mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
hugolib: Add relativeURLs and canonifyURLs to Site
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
c7535b9c25
commit
9e52477d94
@@ -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 {
|
||||
|
Reference in New Issue
Block a user