summaryrefslogtreecommitdiffstats
path: root/hugolib/alias.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-24 11:25:25 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commit87188496fbb68c39567ec3ee3a55a9305a13e48b (patch)
treeb70e4c3ce41c4d97fe70ce8cb06c4ee0e819084c /hugolib/alias.go
parent0c4701f0effbf651891979b925073f6fc5d26a82 (diff)
hugolib, output: Handle aliases for all HTML formats
Diffstat (limited to 'hugolib/alias.go')
-rw-r--r--hugolib/alias.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/hugolib/alias.go b/hugolib/alias.go
index 7120e6086..d5eb35777 100644
--- a/hugolib/alias.go
+++ b/hugolib/alias.go
@@ -88,18 +88,6 @@ func (s *Site) publishDestAlias(allowRoot bool, path, permalink string, p *Page)
isXHTML := strings.HasSuffix(path, ".xhtml")
- if s.Info.relativeURLs {
- // convert `permalink` into URI relative to location of `path`
- baseURL := helpers.SanitizeURLKeepTrailingSlash(s.Cfg.GetString("baseURL"))
- if strings.HasPrefix(permalink, baseURL) {
- permalink = "/" + strings.TrimPrefix(permalink, baseURL)
- }
- permalink, err = helpers.GetRelativePath(permalink, path)
- if err != nil {
- s.Log.ERROR.Println("Failed to make a RelativeURL alias:", path, "redirecting to", permalink)
- }
- permalink = filepath.ToSlash(permalink)
- }
s.Log.DEBUG.Println("creating alias:", path, "redirecting to", permalink)
targetPath, err := handler.targetPathAlias(path)