mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
@@ -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",
|
||||
},
|
||||
|
Reference in New Issue
Block a user