@@ -25,9 +25,9 @@ func (t *templateNamespace) readTemplateInto(templ *TemplInfo) error {
2525 if err != nil {
2626 return err
2727 }
28- templ .Content = removeLeadingBOM (string (b ))
29- if ! templ .NoBaseOf {
30- templ .NoBaseOf = ! needsBaseTemplate (templ .Content )
28+ templ .content = removeLeadingBOM (string (b ))
29+ if ! templ .noBaseOf {
30+ templ .noBaseOf = ! needsBaseTemplate (templ .content )
3131 }
3232 return nil
3333 }(); err != nil {
@@ -43,7 +43,7 @@ var embeddedTemplatesAliases = map[string][]string{
4343}
4444
4545func (t * templateNamespace ) parseTemplate (ti * TemplInfo ) error {
46- if ! ti .NoBaseOf || ti .Category == CategoryBaseof {
46+ if ! ti .noBaseOf || ti .category == CategoryBaseof {
4747 // Delay parsing until we have the base template.
4848 return nil
4949 }
@@ -62,18 +62,18 @@ func (t *templateNamespace) parseTemplate(ti *TemplInfo) error {
6262
6363 if ti .D .IsPlainText {
6464 prototype := t .parseText
65- templ , err = prototype .New (name ).Parse (ti .Content )
65+ templ , err = prototype .New (name ).Parse (ti .content )
6666 if err != nil {
6767 return err
6868 }
6969 } else {
7070 prototype := t .parseHTML
71- templ , err = prototype .New (name ).Parse (ti .Content )
71+ templ , err = prototype .New (name ).Parse (ti .content )
7272 if err != nil {
7373 return err
7474 }
7575
76- if ti .SubCategory == SubCategoryEmbedded {
76+ if ti .subCategory == SubCategoryEmbedded {
7777 // In Hugo 0.146.0 we moved the internal templates around.
7878 // For the "_internal/twitter_cards.html" style templates, they
7979 // were moved to the _partials directory.
@@ -111,17 +111,17 @@ func (t *templateNamespace) applyBaseTemplate(overlay *TemplInfo, base keyTempla
111111 Base : base .Info ,
112112 }
113113
114- base .Info .Overlays = append (base .Info .Overlays , overlay )
114+ base .Info .overlays = append (base .Info .overlays , overlay )
115115
116116 var templ tpl.Template
117117 if overlay .D .IsPlainText {
118118 tt := texttemplate .Must (t .parseText .Clone ()).New (overlay .PathInfo .PathNoLeadingSlash ())
119119 var err error
120- tt , err = tt .Parse (base .Info .Content )
120+ tt , err = tt .Parse (base .Info .content )
121121 if err != nil {
122122 return err
123123 }
124- tt , err = tt .Parse (overlay .Content )
124+ tt , err = tt .Parse (overlay .content )
125125 if err != nil {
126126 return err
127127 }
@@ -130,11 +130,11 @@ func (t *templateNamespace) applyBaseTemplate(overlay *TemplInfo, base keyTempla
130130 } else {
131131 tt := htmltemplate .Must (t .parseHTML .CloneShallow ()).New (overlay .PathInfo .PathNoLeadingSlash ())
132132 var err error
133- tt , err = tt .Parse (base .Info .Content )
133+ tt , err = tt .Parse (base .Info .content )
134134 if err != nil {
135135 return err
136136 }
137- tt , err = tt .Parse (overlay .Content )
137+ tt , err = tt .Parse (overlay .content )
138138 if err != nil {
139139 return err
140140 }
@@ -146,17 +146,17 @@ func (t *templateNamespace) applyBaseTemplate(overlay *TemplInfo, base keyTempla
146146
147147 tb .Template = & TemplInfo {
148148 Template : templ ,
149- Base : base .Info ,
149+ base : base .Info ,
150150 PathInfo : overlay .PathInfo ,
151151 Fi : overlay .Fi ,
152152 D : overlay .D ,
153- NoBaseOf : true ,
153+ noBaseOf : true ,
154154 }
155155
156- variants := overlay .BaseVariants .Get (base .Key )
156+ variants := overlay .baseVariants .Get (base .Key )
157157 if variants == nil {
158158 variants = make (map [TemplateDescriptor ]* TemplWithBaseApplied )
159- overlay .BaseVariants .Insert (base .Key , variants )
159+ overlay .baseVariants .Insert (base .Key , variants )
160160 }
161161 variants [base .Info .D ] = tb
162162 return nil
0 commit comments