Created
June 16, 2013 12:44
-
-
Save kerotaa/5791927 to your computer and use it in GitHub Desktop.
A filter that converts category slug to display name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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