mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
@@ -243,7 +243,6 @@ func (p *pageState) RegularPages() page.Pages {
|
||||
}
|
||||
|
||||
p.regularPages = pages
|
||||
|
||||
})
|
||||
|
||||
return p.regularPages
|
||||
@@ -358,11 +357,9 @@ func (p *pageState) TranslationKey() string {
|
||||
} else if p.IsNode() {
|
||||
p.translationKey = path.Join(p.Kind(), p.SectionsPath())
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
return p.translationKey
|
||||
|
||||
}
|
||||
|
||||
// AllTranslations returns all translations, including the current Page.
|
||||
@@ -469,7 +466,6 @@ func (p *pageState) getLayoutDescriptor() output.LayoutDescriptor {
|
||||
})
|
||||
|
||||
return p.layoutDescriptor
|
||||
|
||||
}
|
||||
|
||||
func (p *pageState) resolveTemplate(layouts ...string) (tpl.Template, bool, error) {
|
||||
@@ -500,7 +496,6 @@ func (p *pageState) initOutputFormat(isRenderingSite bool, idx int) error {
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
// Must be run after the site section tree etc. is built and ready.
|
||||
@@ -546,7 +541,6 @@ func (p *pageState) renderResources() (err error) {
|
||||
for _, i := range toBeDeleted {
|
||||
p.deleteResource(i)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
return
|
||||
@@ -681,7 +675,6 @@ func (p *pageState) Render(layout ...string) (template.HTML, error) {
|
||||
return "", p.wrapError(errors.Wrapf(err, "failed to execute template %q v", layout))
|
||||
}
|
||||
return template.HTML(res), nil
|
||||
|
||||
}
|
||||
|
||||
// wrapError adds some more context to the given error if possible/needed
|
||||
@@ -714,7 +707,6 @@ func (p *pageState) getContentConverter() converter.Converter {
|
||||
markup = "markdown"
|
||||
}
|
||||
p.m.contentConverter, err = p.m.newContentConverter(p, markup, p.m.renderingConfigOverrides)
|
||||
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
@@ -724,7 +716,6 @@ func (p *pageState) getContentConverter() converter.Converter {
|
||||
}
|
||||
|
||||
func (p *pageState) mapContent(bucket *pagesMapBucket, meta *pageMeta) error {
|
||||
|
||||
s := p.shortcodeState
|
||||
|
||||
rn := &pageContentMap{
|
||||
@@ -893,7 +884,6 @@ func (p *pageState) parseError(err error, input []byte, offset int) error {
|
||||
}
|
||||
pos := p.posFromInput(input, offset)
|
||||
return herrors.NewFileError("md", -1, pos.LineNumber, pos.ColumnNumber, err)
|
||||
|
||||
}
|
||||
|
||||
func (p *pageState) pathOrTitle() string {
|
||||
@@ -955,7 +945,6 @@ func (p *pageState) shiftToOutputFormat(isRenderingSite bool, idx int) error {
|
||||
if isRenderingSite {
|
||||
cp := p.pageOutput.cp
|
||||
if cp == nil {
|
||||
|
||||
// Look for content to reuse.
|
||||
for i := 0; i < len(p.pageOutputs); i++ {
|
||||
if i == idx {
|
||||
|
Reference in New Issue
Block a user