Home

Awesome

pluralize

A Liquid filter to make it easy to form correct plurals.

At some point, every programmer has had to display a count of objects, like “36 pages” or “1 message”. This Liquid filter makes it easier to form these plurals correctly—no more taking the lazy way out and writing {{ number }} message(s)! (Or worse, assuming that the number will be greater than one.)

Installation

The easiest way to install this plugin is with RubyGems: gem install liquid_pluralize.

If you’re using Jekyll, see the Jekyll documentation on installing plugins for more-detailed installation instructions.

Usage

The sole provided function is pluralize. It can be used in one of two ways:

Author

This script was written by Benjamin Esham.

This project is hosted on GitHub. Please feel free to submit pull requests.

Version history

The version numbers of this project conform to Semantic Versioning 2.0.

License

This project is released into the public domain via the Unlicense, which you can find in the file LICENSE.md.