Class: JekyllBookshop::IncludeTag

Inherits:
CommonTag
  • Object
show all
Defined in:
lib/jekyll-bookshop/tags/bookshop-include-tag.rb

Instance Method Summary collapse

Methods inherited from CommonTag

#parse_params, #render_once_found

Instance Method Details

#render(context) ⇒ Object

Map include names to the .jekyll.html files found in bookshop



11
12
13
14
15
16
# File 'lib/jekyll-bookshop/tags/bookshop-include-tag.rb', line 11

def render(context)
  file = render_variable(context) || @file

  file = "#{file}.jekyll.html"
  render_once_found(context, file)
end

#tag_includes_dirs(context) ⇒ Object

Look for includes in the built bookshop directory



6
7
8
# File 'lib/jekyll-bookshop/tags/bookshop-include-tag.rb', line 6

def tag_includes_dirs(context)
  context["site"]["bookshop_shared_locations"].freeze
end