Skip to content

Instantly share code, notes, and snippets.

@wjdp
Last active February 28, 2016 22:12
Show Gist options
  • Save wjdp/d45409ed34a8d206efd8 to your computer and use it in GitHub Desktop.
Save wjdp/d45409ed34a8d206efd8 to your computer and use it in GitHub Desktop.
[Jekyll3] Adds an include_root tag, works like include_relative but starts from the root of the project
module Jekyll
module Tags
class IncludeRootTag < IncludeTag
def resolved_includes_dir(context)
'.'.freeze
end
end
end
end
Liquid::Template.register_tag('include_root', Jekyll::Tags::IncludeRootTag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment