Closed cboettig closed 12 years ago
This was implemented in c4d713b6bbb1a61f65583de32112756200231d5e.
Brilliant, thanks. I'll add it to the wiki. Is there an automated list of all filters available in the documentation somewhere? Perhaps I shouldn't be relying on the wiki to know what's implemented...
Liquid has been a fantastic library with very useful filters. One that I keep feeling that lack of is a modulus/remainder operator, which comes in real handy when computing row/column positions for where to stick certain elements on a grid.
For instance, I often have an array of content, maybe it's
site.posts
on a jekyll site, and I want to organize them into a twitter-bootstrap style grid.This is easy to specify column-wise in liquid, since you have integer division
But if I'd rather fill out posts going across rows instead of down columns I need to do get the remainder of index/3, not the integer divisor. Think you might consider adding support for such a filter? (guess I should learn to extend my own filters too...)