Skip to content

Instantly share code, notes, and snippets.

@kerotaa
Created June 16, 2013 12:44
Show Gist options
  • Save kerotaa/5791927 to your computer and use it in GitHub Desktop.
Save kerotaa/5791927 to your computer and use it in GitHub Desktop.
A filter that converts category slug to display name.
module Jekyll
module Slug2Name
def slug2name(input)
slug = @context.registers[:site].config['category_slugs'][input]
slug ? slug : input
end
end
end
Liquid::Template.register_filter(Jekyll::Slug2Name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment