projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fd30d4
)
hugolib: Improve error message for bad taxonomy weights
author
Cameron Moore
<moorereason@gmail.com>
Wed, 3 Oct 2018 03:26:08 +0000
(22:26 -0500)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Wed, 3 Oct 2018 06:34:45 +0000
(09:34 +0300)
Error is now "Unable to convert taxonomy weight []string{"40"} to int
for variables/files.md"
hugolib/site.go
patch
|
blob
|
history
diff --git
a/hugolib/site.go
b/hugolib/site.go
index f7f84b47dec1360ee7fa9525549f2201c46f68be..71a8a03e38fe5e8cbe28b34863b3952637d9facf 100644
(file)
--- a/
hugolib/site.go
+++ b/
hugolib/site.go
@@
-1470,9
+1470,10
@@
func (s *Site) assembleTaxonomies() {
for _, p := range s.Pages {
vals := p.getParam(plural, !s.Info.preserveTaxonomyNames)
- weight, err := cast.ToIntE(p.getParamToLower(plural + "_weight"))
+ w := p.getParamToLower(plural + "_weight")
+ weight, err := cast.ToIntE(w)
if err != nil {
- s.Log.ERROR.Print
("unable to convert taxonomy weight to int"
)
+ s.Log.ERROR.Print
f("Unable to convert taxonomy weight %#v to int for %s", w, p.Source.File.Path()
)
// weight will equal zero, so let the flow continue
}