mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
parent
5542f02fbc
commit
b3cb6788b2
35 changed files with 386 additions and 323 deletions
|
@ -29,6 +29,7 @@ import (
|
|||
|
||||
"github.com/gohugoio/hugo/output"
|
||||
|
||||
"github.com/gohugoio/hugo/resources/kinds"
|
||||
"github.com/gohugoio/hugo/resources/page"
|
||||
"github.com/gohugoio/hugo/resources/page/pagemeta"
|
||||
)
|
||||
|
@ -228,7 +229,7 @@ func (s *Site) renderPaginator(p *pageState, templ tpl.Template) error {
|
|||
func (s *Site) render404() error {
|
||||
p, err := newPageStandalone(&pageMeta{
|
||||
s: s,
|
||||
kind: kind404,
|
||||
kind: kinds.Kind404,
|
||||
urlPaths: pagemeta.URLPath{
|
||||
URL: "404.html",
|
||||
},
|
||||
|
@ -244,7 +245,7 @@ func (s *Site) render404() error {
|
|||
}
|
||||
|
||||
var d layouts.LayoutDescriptor
|
||||
d.Kind = kind404
|
||||
d.Kind = kinds.Kind404
|
||||
|
||||
templ, found, err := s.Tmpl().LookupLayout(d, output.HTMLFormat)
|
||||
if err != nil {
|
||||
|
@ -266,7 +267,7 @@ func (s *Site) render404() error {
|
|||
func (s *Site) renderSitemap() error {
|
||||
p, err := newPageStandalone(&pageMeta{
|
||||
s: s,
|
||||
kind: kindSitemap,
|
||||
kind: kinds.KindSitemap,
|
||||
urlPaths: pagemeta.URLPath{
|
||||
URL: s.conf.Sitemap.Filename,
|
||||
},
|
||||
|
@ -294,13 +295,13 @@ func (s *Site) renderSitemap() error {
|
|||
}
|
||||
|
||||
func (s *Site) renderRobotsTXT() error {
|
||||
if !s.conf.EnableRobotsTXT && s.isEnabled(kindRobotsTXT) {
|
||||
if !s.conf.EnableRobotsTXT && s.isEnabled(kinds.KindRobotsTXT) {
|
||||
return nil
|
||||
}
|
||||
|
||||
p, err := newPageStandalone(&pageMeta{
|
||||
s: s,
|
||||
kind: kindRobotsTXT,
|
||||
kind: kinds.KindRobotsTXT,
|
||||
urlPaths: pagemeta.URLPath{
|
||||
URL: "robots.txt",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue