Skip to content

Commit e57dcd3

Browse files
deiningbep
authored andcommitted
Improve warning message on superfluous prefix when using function 'partials.Include'
1 parent eaf5ace commit e57dcd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tpl/partials/partials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (ns *Namespace) lookup(name string) (*tplimpl.TemplInfo, error) {
133133
if strings.HasPrefix(name, "partials/") {
134134
// This is most likely not what the user intended.
135135
// This worked before Hugo 0.146.0.
136-
ns.deps.Log.Warnidf(constants.WarnPartialSuperfluousPrefix, "Partial name %q starting with 'partials/' (as in {{ partial \"%s\"}}) is most likely not what you want. Before 0.146.0 we did a double lookup in this situation.", name, name)
136+
ns.deps.Log.Warnidf(constants.WarnPartialSuperfluousPrefix, "Doubtful use of partial function in {{ partial \"%s\"}}), this is most likely not what you want. Consider removing superfluous prefix \"partials/\" from template name given as first function argument.", name)
137137
}
138138
v := ns.deps.TemplateStore.LookupPartial(name)
139139
if v == nil {

0 commit comments

Comments
 (0)