Add categories to cookbook

This commit is contained in:
Paulus Schoutsen 2016-02-07 14:21:44 -08:00
parent f5a7217b3f
commit a06217bbee
17 changed files with 273 additions and 20 deletions

View file

@ -6,9 +6,9 @@ module Jekyll
end
def render(context)
slug = @title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
"<a class='title-link' name='#{slug}' href='\##{slug}'></a> #{@title}"
title = Liquid::Template.parse(@markup).render context
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
"<a class='title-link' name='#{slug}' href='\##{slug}'></a> #{title}"
end
end
end