class Jekyll::Tags::IncludeRelativeTag
def page_path(context)
def page_path(context) page, site = context.registers.values_at(:page, :site) return site.source unless page site.in_source_dir File.dirname(resource_path(page, site)) end
def resource_path(page, site)
def resource_path(page, site) path = page["path"] path = File.join(site.config["collections_dir"], path) if page["collection"] path.delete_suffix("/#excerpt") end
def tag_includes_dirs(context)
def tag_includes_dirs(context) Array(page_path(context)).freeze end