mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
parent
32471b57bd
commit
d90e37e0c6
442 changed files with 1426 additions and 2254 deletions
|
@ -53,7 +53,6 @@ func (s siteRenderContext) renderSingletonPages() bool {
|
|||
|
||||
// 1 for all sites
|
||||
return s.sitesOutIdx == 0
|
||||
|
||||
}
|
||||
|
||||
// renderPages renders pages each corresponding to a markdown file.
|
||||
|
@ -107,7 +106,6 @@ func pageRenderer(
|
|||
pages <-chan *pageState,
|
||||
results chan<- error,
|
||||
wg *sync.WaitGroup) {
|
||||
|
||||
defer wg.Done()
|
||||
|
||||
for p := range pages {
|
||||
|
@ -184,7 +182,6 @@ func (s *Site) logMissingLayout(name, layout, kind, outputFormat string) {
|
|||
|
||||
// renderPaginator must be run after the owning Page has been rendered.
|
||||
func (s *Site) renderPaginator(p *pageState, templ tpl.Template) error {
|
||||
|
||||
paginatePath := s.Cfg.GetString("paginatePath")
|
||||
|
||||
d := p.targetPathDescriptor
|
||||
|
@ -234,7 +231,6 @@ func (s *Site) render404() error {
|
|||
},
|
||||
output.HTMLFormat,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -269,10 +265,10 @@ func (s *Site) renderSitemap() error {
|
|||
kind: kindSitemap,
|
||||
urlPaths: pagemeta.URLPath{
|
||||
URL: s.siteCfg.sitemap.Filename,
|
||||
}},
|
||||
},
|
||||
},
|
||||
output.HTMLFormat,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -305,7 +301,6 @@ func (s *Site) renderRobotsTXT() error {
|
|||
},
|
||||
},
|
||||
output.RobotsTxtFormat)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -317,7 +312,6 @@ func (s *Site) renderRobotsTXT() error {
|
|||
templ := s.lookupLayouts("robots.txt", "_default/robots.txt", "_internal/_default/robots.txt")
|
||||
|
||||
return s.renderAndWritePage(&s.PathSpec.ProcessingStats.Pages, "Robots Txt", p.targetPaths().TargetFilename, p, templ)
|
||||
|
||||
}
|
||||
|
||||
// renderAliases renders shell pages that simply have a redirect in the header.
|
||||
|
@ -385,7 +379,6 @@ func (s *Site) renderAliases() error {
|
|||
// renderMainLanguageRedirect creates a redirect to the main language home,
|
||||
// depending on if it lives in sub folder (e.g. /en) or not.
|
||||
func (s *Site) renderMainLanguageRedirect() error {
|
||||
|
||||
if !s.h.multilingual.enabled() || s.h.IsMultihost() {
|
||||
// No need for a redirect
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue