Update getting started

This commit is contained in:
Paulus Schoutsen 2016-04-16 17:10:09 -07:00
parent 02022912d8
commit 432ee1a169
25 changed files with 691 additions and 540 deletions

View file

@ -1,5 +1,3 @@
require 'pry'
module Jekyll
class ActiveLinkTag < Liquid::Tag
def initialize(tag_name, text, token)
@ -10,8 +8,10 @@ module Jekyll
end
def render(context)
href = Liquid::Template.parse(@href).render context
title = Liquid::Template.parse(@title).render context
cls = @href == context.registers[:page]["url"] ? "class='active'" : ''
"<a #{cls} href='#{@href}'>#{@title}</a>"
"<a #{cls} href='#{href}'>#{title}</a>"
end
end
end