LocomotiveCMS Liquids

A package of misc liquid blocks, tags and filters for Wagon and LocomotiveCMS engine.

View the Project on GitHub bitaculous/locomotivecms-liquids

This Gem includes useful Liquid blocks, tags and filters which can be all embedded in both Wagon and the Engine. Behind the scene, it uses Solid to write reliable and consistent Liquid code.

Contents

Filters

Collections

sample
{{<ARRAY> | sample}}

{{<ARRAY> | sample: <NUMBER>}}

Helpers

url_for
{{<STRING> | url_for}}

Math

mod
{{<INTEGER> | mod: <MODULUS>}}

Text

handleize
{{<STRING> | handleize}}

{{<STRING> | handleize: <DIVIDER>}}

Tags

title

{% title %}

{% title name: '<NAME>', title: '<TITLE>', divider: '<DIVIDER>' %}

Installation

Wagon

In your Wagon site, add the following lines to your Gemfile:

group :misc do
  gem 'locomotivecms-liquids', github: 'bitaculous/locomotivecms-liquids'
end

Engine

In the Gemfile of your engine, add the following line:

gem 'locomotivecms-liquids', github: 'bitaculous/locomotivecms-liquids'

Development

Run specs with RSpec

Run rspec.

or via Guard:

$ guard -g spec

See Test Coverage

Run COVERAGE=true rspec.

Run RuboCop

Run rubocop.

To run all specs and RuboCop altogether, run rake.

Code Status

Travis CI Status Code Climate Status Test Coverage Status Gemnasium Status

Bug Reports

Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems here.

Versioning

This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and / or a new version should be immediately released that restores compatibility.

Credits

The people behind LocomotiveCMS, especially Didier Lafforgue, for creating LocomotiveCMS::LiquidExtensions which this Gem is based on.

License

Liquids is released under the MIT License (MIT), see LICENSE.