Skip to content

dennisfrank/jekyll-round-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

jekyll-round-filter

This Liquid filter lets you round floats in Jekyll templates to a given precision in decimal digits.

Installation

Copy jekyll-round-filter.rb file into _plugins directory.

Usage

{{ float | round: precision }}

Examples:

{{ 512.4562 | round }}      => 512
{{ 512.4562 | round: 2 }}   => 512.46

Reference:

http://ruby-doc.org/core-1.9.3/Float.html#method-i-round

About

A Liquid filter to round floats in Jekyll templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published