Skip to content

Instantly share code, notes, and snippets.

View bsubedi26's full-sized avatar

Bibek Subedi bsubedi26

View GitHub Profile
@bsubedi26
bsubedi26 / plugin.rb
Created July 24, 2018 20:38
jekyll categorize collections
# frozen_string_literal: true
require "jekyll"
module Jekyll
class CategorizePageGenerator < Jekyll::Generator
safe true
def get_collection(name)
@site.collections[name] ? @site.collections[name].docs : []
end