mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 13:52:03 -05:00
57adc539fc
Add a template function that allows conversion to float. This is useful, for example, when passing aspect ratios into templates, which tend to not be integers. Fixes #3307
466 B
466 B
title | linktitle | description | godocref | date | publishdate | lastmod | categories | menu | keywords | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
float | float | Creates a `float` from the argument passed into the function. | 2017-09-28 | 2017-09-28 | 2017-09-28 |
|
|
|
|
false |
Useful for turning strings into floating point numbers.
{{ float "1.23" }} → 1.23