diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-05-02 09:54:26 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-05-02 14:23:16 +0200 |
commit | 6b76841b052b97625b8995f326d758b89f5c2349 (patch) | |
tree | 0a29c666b6e11e6c73f64da4beb0ca86d3965da5 /hugolib/site_render.go | |
parent | bcbed4ebdaf55b67abc521d69bba456c041a7e7d (diff) |
output: Fix permalink in sitemap etc. when multiple permalinkable output formats
In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.
This commit fixes that by making `HTML` by default sort before the others.
If this is not you want, you can set `weight` on the output format configuration.
Fixes #5910
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r-- | hugolib/site_render.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go index 9ade951df..34f288da2 100644 --- a/hugolib/site_render.go +++ b/hugolib/site_render.go @@ -35,7 +35,7 @@ type siteRenderContext struct { sitesOutIdx int // Zero based index of the output formats configured within a Site. - // Note that these outputs are sorted, so CSS will come before HTML. + // Note that these outputs are sorted. outIdx int multihost bool |