Round a float to decimal places with Hugo Shortcodes

The idea for this post came from Shauna Gordon , who gave me some great tips on how to better handle math functions in Hugo. Thanks, Shauna! The built-in Go math.Round function rounds to integers. So, to round a number to decimals using Hugo, you need to write a small shortcode. The following examples all use the technique described in Round float to any precision in Go . A…