mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 18:02:09 -05:00
node to page: Render aliases before pages
Some sites, Hugo docs included, have faulty alias definitions that point to itself or another real page. These will be overwritten in the next step. This is how it behaves in Hugo 0.17, too. Updates #2297
This commit is contained in:
parent
32fb1e6fac
commit
0bbdcf24fe
1 changed files with 9 additions and 5 deletions
|
@ -814,16 +814,20 @@ func (s *Site) render() (err error) {
|
||||||
}
|
}
|
||||||
s.timerStep("prepare pages")
|
s.timerStep("prepare pages")
|
||||||
|
|
||||||
if err = s.renderPages(); err != nil {
|
// Aliases must be rendered before pages.
|
||||||
return
|
// Some sites, Hugo docs included, have faulty alias definitions that point
|
||||||
}
|
// to itself or another real page. These will be overwritten in the next
|
||||||
s.timerStep("render and write pages")
|
// step.
|
||||||
|
|
||||||
if err = s.renderAliases(); err != nil {
|
if err = s.renderAliases(); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.timerStep("render and write aliases")
|
s.timerStep("render and write aliases")
|
||||||
|
|
||||||
|
if err = s.renderPages(); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
s.timerStep("render and write pages")
|
||||||
|
|
||||||
if err = s.renderSitemap(); err != nil {
|
if err = s.renderSitemap(); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue