mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
@@ -167,7 +167,6 @@ func newTemplateExec(d *deps.Deps) (*templateExec, error) {
|
||||
if d.WithTemplate != nil {
|
||||
if err := d.WithTemplate(e); err != nil {
|
||||
return nil, err
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +245,6 @@ func (t *templateExec) MarkReady() error {
|
||||
})
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
|
||||
type templateHandler struct {
|
||||
@@ -345,7 +343,6 @@ func (t *templateHandler) LookupVariant(name string, variants tpl.TemplateVarian
|
||||
more := len(s.variants) > 1
|
||||
|
||||
return sv.ts, true, more
|
||||
|
||||
}
|
||||
|
||||
// LookupVariants returns all variants of name, nil if none found.
|
||||
@@ -362,11 +359,9 @@ func (t *templateHandler) LookupVariants(name string) []tpl.Template {
|
||||
}
|
||||
|
||||
return variants
|
||||
|
||||
}
|
||||
|
||||
func (t *templateHandler) HasTemplate(name string) bool {
|
||||
|
||||
if _, found := t.baseof[name]; found {
|
||||
return true
|
||||
}
|
||||
@@ -501,7 +496,6 @@ func (t *templateHandler) addFileContext(templ tpl.Template, inerr error) error
|
||||
err, _ := checkFilename(ts.baseInfo, inerr)
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
|
||||
func (t *templateHandler) addShortcodeVariant(ts *templateState) {
|
||||
@@ -584,7 +578,6 @@ func (t *templateHandler) addTemplateFile(name, path string) error {
|
||||
t.applyTemplateTransformers(t.main, templ)
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (t *templateHandler) addTemplateTo(info templateInfo, to *templateNamespace) (*templateState, error) {
|
||||
@@ -716,7 +709,6 @@ func (t *templateHandler) loadTemplates() error {
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (t *templateHandler) nameIsText(name string) (string, bool) {
|
||||
@@ -763,7 +755,6 @@ func (t *templateHandler) extractPartials(templ tpl.Template) error {
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (t *templateHandler) postTransform() error {
|
||||
@@ -874,7 +865,6 @@ func (t *templateNamespace) newTemplateLookup(in *templateState) func(name strin
|
||||
return newTemplateState(templ, templateInfo{name: templ.Name()})
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,7 +923,6 @@ func (t *templateState) isText() bool {
|
||||
func isText(templ tpl.Template) bool {
|
||||
_, isText := templ.(*texttemplate.Template)
|
||||
return isText
|
||||
|
||||
}
|
||||
|
||||
type templateStateMap struct {
|
||||
@@ -1003,7 +992,6 @@ func removeLeadingBOM(s string) string {
|
||||
}
|
||||
|
||||
return s
|
||||
|
||||
}
|
||||
|
||||
// resolves _internal/shortcodes/param.html => param.html etc.
|
||||
@@ -1015,7 +1003,6 @@ func templateBaseName(typ templateType, name string) string {
|
||||
default:
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func unwrap(templ tpl.Template) tpl.Template {
|
||||
@@ -1041,5 +1028,4 @@ func templates(in tpl.Template) []tpl.Template {
|
||||
}
|
||||
|
||||
return templs
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user