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, #load_cached_partial, #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



178
179
180
# File 'lib/jekyll/tags/include.rb', line 178

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

#resolved_includes_dir(context) ⇒ Object



182
183
184
# File 'lib/jekyll/tags/include.rb', line 182

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

#tag_includes_dir(context) ⇒ Object



174
175
176
# File 'lib/jekyll/tags/include.rb', line 174

def tag_includes_dir(context)
  '.'.freeze
end