jekyll-include-absolute-plugin icon indicating copy to clipboard operation
jekyll-include-absolute-plugin copied to clipboard

Doesn't actually support absolute paths

Open snan opened this issue 5 years ago • 6 comments

Paths like ../foo/bar are still relative paths. An absolute path is something like /home/sandra/foo/bar, starts with a slash typically.

You can pull from https://idiomdrottning.org/jekyll-include-absolute-plugin if you want because I've fixed it there. Much love♥

snan avatar Aug 23 '20 19:08 snan

I made a GitHub repo with the work @snan did folded into master.

mslinn avatar Oct 01 '20 14:10 mslinn

Thank you for that♥

Mike Slinn [email protected] writes:

I made a GitHub repo with the work @snan did folded into master.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/tnhu/jekyll-include-absolute-plugin/issues/10#issuecomment-702166738

snan avatar Oct 01 '20 14:10 snan

I just added the ability to include files relative to the user home directory. Please see the mslinn branch in my GitHub repo

These work now:

{% include_absolute '/etc/passwd' %}
{% include_absolute '~/.ssh/config' %}

I did not make a PR because as I noted in the README I disabled the validate_file_name invocation because I do not have time to figure out how to modify it so that filenames relative to the home directory would work.

mslinn avatar Oct 01 '20 16:10 mslinn

I just added the ability to include executable files on the PATH. I also renamed the plugin to flexible_include because it can include 4 ways, not just absolute and relative. Please see the mslinn branch in my GitHub repo.

You can see my other Jekyll plugins here.

mslinn avatar Oct 02 '20 13:10 mslinn

Thank you, Mike. I updated my repo web page to include a link to your wonderful repo.

snan avatar Oct 12 '20 11:10 snan

I added a new plugin that provides 3 new filters related to including files: from, to and until.

mslinn avatar Oct 23 '20 12:10 mslinn