mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 16:17:21 +00:00
Allows 404 templates from themes/THEME directories.
This commit is contained in:
1 parent
ac99ceccac
commit
78962a14f8
1 file changed
+7
-6
+7
-6
@@ -738,13 +738,14 @@ func (s *Site) RenderHomePage() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if a := s.Tmpl.Lookup("404.html"); a != nil {
|
n.Url = helpers.Urlize("404.html")
|
||||||
n.Url = helpers.Urlize("404.html")
|
n.Title = "404 Page not found"
|
||||||
n.Title = "404 Page not found"
|
n.Permalink = s.permalink("404.html")
|
||||||
n.Permalink = s.permalink("404.html")
|
|
||||||
|
|
||||||
layouts := []string{"404.html"}
|
nfLayouts := []string{"404.html"}
|
||||||
return s.render(n, "404.html", s.appendThemeTemplates(layouts)...)
|
nfErr := s.render(n, "404.html", s.appendThemeTemplates(nfLayouts)...)
|
||||||
|
if nfErr != nil {
|
||||||
|
return nfErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in new issue
Block a user