Class: Jekyll::IncludeTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll/tags/include.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag_name, file, tokens) ⇒ IncludeTag

Returns a new instance of IncludeTag.



4
5
6
7
# File 'lib/jekyll/tags/include.rb', line 4

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

Instance Method Details

#render(context) ⇒ Object



9
10
11
# File 'lib/jekyll/tags/include.rb', line 9

def render(context)
  File.read(File.join(Jekyll.source, '_includes', @file))
end