Skip to content

Commit

Permalink
hugolib: Fix alias path for AMP and similar
Browse files Browse the repository at this point in the history
Fixes #5760
  • Loading branch information
bep committed Mar 30, 2019
1 parent 439ab03 commit f9d6fec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hugolib/alias_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}

Expand Down
2 changes: 1 addition & 1 deletion hugolib/site_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9d6fec

Please sign in to comment.