Repository navigation
Conversation
This is a refresh of the changes by @feuerbach in jekyll#8299, using `FileUtils.ln_sf` to force overwriting instead of calling the `unlink` ourselves. Fixes jekyll#6870, closes jekyll#8299
|
Rebased to current HEAD. Anything else I can do to help here? |
|
At a minimum, this needs a check to ensure that the resolved symlink is inside the site's source directory. Dereferencing symlinks that point to outside the site source is a large security risk that this PR doesn't address yet. |
|
Oh yeah - I think I can see how that would be awful. Not quite sure how to address though. My use-case is where I deploy approximately 50GB of files outside of git and want to reference those instead of copying around. |
Maybe you can use hardlinks instead? :) |
|
> Maybe you can use [hardlinks](https://rubygems.org/gems/jekyll-hardlinks) instead? :)
This is dependent on another tool ([git-annex](https://git-annex.branchable.com/)), which reduces my flexibility a lot.
it just changes `Jekyll::StaticFile#write` to use `FileUtils.ln` 🤔
|
|
Given the issues raised with this draft, I've decided to just eat the additional storage requirements instead of trying to improve on this code here. |
This is a 🐛 bug fix.
Summary
Instead of copying symlinks verbatim to
_site, this rewrites them to the absolute path so that they keep pointing at the right file.Context
This is a rebase of #8299 with all comments from that PR addressed and tests added.
Fixes #6870, closes #8299