A Liquid tag plugin for Jekyll that allows remote includes from external sources.
Add this line to your application's Gemfile:
group :jekyll_plugins do
gem 'jekyll-remote-include', :github => 'netrics/jekyll-remote-include'
endAnd then execute:
$ bundle
Or install it yourself as:
$ gem install jekyll-remote-include
Then add the following to your site's _config.yml:
plugins:
- jekyll-remote-include💡 If you are using a Jekyll version less than 3.5.0, use the gems key instead of plugins.
Use the tag as follows in your Jekyll pages, posts and collections:
{% remote_include https://raw.githubusercontent.com/jekyll/jekyll/master/README.markdown %}or use with a liquid variable (eg. link from front matter):
{% if page.my_variable %}
{% remote_include {{ page.my_variable }} %}
{% endif %}- Fork it.
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request