Skip to content
Permalink
Browse files

hugolib: Fix alias path for AMP and similar

Fixes #5760
  • Loading branch information...
bep committed Mar 30, 2019
1 parent 439ab03 commit f9d6feca0802cd83c4d843244ce389cf7c792cec
Showing with 2 additions and 2 deletions.
  1. +1 −1 hugolib/alias_test.go
  2. +1 −1 hugolib/site_render.go
@@ -80,7 +80,7 @@ func TestAliasMultipleOutputFormats(t *testing.T) {

// the alias redirectors
b.AssertFileContent("public/foo/bar/index.html", "<meta http-equiv=\"refresh\" content=\"0; ")
b.AssertFileContent("public/foo/bar/amp/index.html", "<meta http-equiv=\"refresh\" content=\"0; ")
b.AssertFileContent("public/amp/foo/bar/index.html", "<meta http-equiv=\"refresh\" content=\"0; ")
assert.False(b.CheckExists("public/foo/bar/index.json"))
}

@@ -305,7 +305,7 @@ func (s *Site) renderAliases() error {
for _, a := range p.Aliases() {
if f.Path != "" {
// Make sure AMP and similar doesn't clash with regular aliases.
a = path.Join(a, f.Path)
a = path.Join(f.Path, a)
}

lang := p.Language().Lang

0 comments on commit f9d6fec

Please sign in to comment.
You can’t perform that action at this time.