mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -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")
|
||||
|
||||
if err = s.renderPages(); err != nil {
|
||||
return
|
||||
}
|
||||
s.timerStep("render and write pages")
|
||||
|
||||
// Aliases must be rendered 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.
|
||||
if err = s.renderAliases(); err != nil {
|
||||
return
|
||||
}
|
||||
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 {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue