This Jekyll plugin provides two Liquid tags that take a relative path to .html file path.
Add this line to your Gemfile:
group :jekyll_plugins do
gem "jekyll-include-head-body", :git => "https://github.com/Sixshaman/jekyll-include-head-body/"
end
And then execute:
$ bundle install
<html>
<head>
{% include_head file.html %}
</head>
<body>
{% include_body file.html %}
</body>
</html>
Usage with relative paths is a bit more complicated:
<html>
<head>
<base href="{{ site.url }}{{ page.url }}/">
{% include_head src/file.html %}
</head>
<body>
{% include_body src/file.html %}
</body>
</html>
By default the plugin outputs the contents of the corresponding HTML section of the specified file.