Class: Jekyll::Tags::IncludeRelativeTag

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

Constant Summary

Constants inherited from IncludeTag

Jekyll::Tags::IncludeTag::VALID_SYNTAX, Jekyll::Tags::IncludeTag::VARIABLE_SYNTAX

Instance Attribute Summary

Attributes inherited from IncludeTag

#includes_dir

Instance Method Summary collapse

Methods inherited from IncludeTag

#file_read_opts, #initialize, #parse_params, #path_relative_to_source, #read_file, #realpath_prefixed_with?, #render, #render_variable, #syntax_example, #validate_file_name, #validate_params, #validate_path

Constructor Details

This class inherits a constructor from Jekyll::Tags::IncludeTag

Instance Method Details

#page_path(context) ⇒ Object


168
169
170
# File 'lib/jekyll/tags/include.rb', line 168

def page_path(context)
  context.registers[:page].nil? ? includes_dir : File.dirname(context.registers[:page]["path"])
end

#resolved_includes_dir(context) ⇒ Object


172
173
174
# File 'lib/jekyll/tags/include.rb', line 172

def resolved_includes_dir(context)
  context.registers[:site].in_source_dir(page_path(context))
end

#tag_includes_dirObject


164
165
166
# File 'lib/jekyll/tags/include.rb', line 164

def tag_includes_dir
  '.'.freeze
end