问题现象:
运行服务器时,报错
Start building sites …
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
Error: Error building site: failed to render pages: render of "taxonomy" failed: "...\www\themes\hugo-theme-shoka\layouts_default\terms.html:40:24": execute of template failed: template: _default/terms.html:40:24: executing "main" at <div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min))>: error calling div: can't divide the value by 0
Built in 185 ms
问题现象: 运行服务器时,报错 Start building sites … hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio Error: Error building site: failed to render pages: render of "taxonomy" failed: "...\www\themes\hugo-theme-shoka\layouts_default\terms.html:40:24": execute of template failed: template: _default/terms.html:40:24: executing "main" at <div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min))>: error calling div: can't divide the value by 0 Built in 185 ms
问题原因分析:
问题代码位置: ...\www\themes\hugo-theme-shoka\layouts_default\terms.html:40:24
原因 除数没有接收为0时的异常