Skip to content

Instantly share code, notes, and snippets.

@benib
benib / .block
Created February 2, 2017 16:39 — forked from mbostock/.block
Pie Chart
license: gpl-3.0
module Jekyll
class CategoryAwarePrevNextGenerator < Generator
safe true
priority :high
def generate(site)
site.categories.each_pair do |category_name, posts|
posts.sort! { |a, b| a <=> b }