Added new human_size filter today

We added new human_size filter today to display.

New human_size filter =====================

We added a new filter called human_size. It will format numbers in to human readable filenames for you.

This is just good manners. If you had a set of files you wanted to allow your users to download, then it might be polite to let them know how big the file is to download, especially if they are mobile!

Here is an example …

{% for each d in item.downloads %} {{ | link: d.url }} ({{ d.file_size | human_size }}) <br> {% endfor %}

This snippet will list all the downloads and display in (brackets) the file size of the download next to the link.


by Craig Sullivan

17 May 2012