Update getting started
This commit is contained in:
parent
02022912d8
commit
432ee1a169
25 changed files with 691 additions and 540 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue