hugo/docs/content/functions/float.md
Lucas Jenss 57adc539fc tpl: Add float template function
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
2017-09-28 16:53:18 +02:00

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
functions
docs
parent
functions
strings
floats
float INPUT
false

Useful for turning strings into floating point numbers.

{{ float "1.23" }} → 1.23