summaryrefslogtreecommitdiffstats
path: root/hugolib/alias.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/alias.go')
-rw-r--r--hugolib/alias.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/hugolib/alias.go b/hugolib/alias.go
index b97094ecc..c1f668d41 100644
--- a/hugolib/alias.go
+++ b/hugolib/alias.go
@@ -99,8 +99,11 @@ func (s *Site) publishDestAlias(allowRoot bool, path, permalink string, outputFo
OutputFormat: outputFormat,
}
- return s.publisher.Publish(pd)
+ if s.Info.relativeURLs || s.Info.canonifyURLs {
+ pd.AbsURLPath = s.absURLPath(targetPath)
+ }
+ return s.publisher.Publish(pd)
}
func (a aliasHandler) targetPathAlias(src string) (string, error) {