Class: JekyllNavigation::NavigationControllerTag

Inherits:
Liquid::Block
  • Object
show all
Defined in:
lib/jekyll-navigation.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag_name, level, tokens) ⇒ NavigationControllerTag

Returns a new instance of NavigationControllerTag.



8
9
10
11
# File 'lib/jekyll-navigation.rb', line 8

def initialize(tag_name, level, tokens)
  super
  @level = level.to_s.strip
end

Instance Method Details

#render(context) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/jekyll-navigation.rb', line 13

def render(context)
  navigation = Navigation.new(context, @level)
  
  if navigation.display?
    super
  else
    ""
  end
end