New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jekyll build deletes files in symbolically linked directory in the _site folder. #3095

Closed
drlube opened this Issue Nov 12, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@drlube
Copy link

drlube commented Nov 12, 2014

In case anyone else is pulling out their hair with this one:

Steps to reproduce:

  • jekyll build
  • cd _site
  • ln -s ../test.com/uploads (this directory has a bunch of PDF files)
  • cd ..
  • jekyll build
  • I notice that one file is deleted from the 'uploads' directory each time I run jekyll build! Jekyll throws an error since it can't find a file being linked to from within my site: <a href="/uploads/file.pdf" target="_blank">PDF File</a>

I have resorted to deleting the uploads symlink before I build and then re-linking it when the build is complete.

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Nov 12, 2014

Which one is deleted? Our Cleaner class cleans up the site destination to prevent files that aren't in the resulting site from lying around.

@drlube

This comment has been minimized.

Copy link
Author

drlube commented Nov 12, 2014

There does not seem to be a rhyme or reason to the order of the file being deleted. There are a mix of .pdf, .zip, .jpg, .png in the symlinked directory in question. The files that were deleted (6 in total, from 6 different build attempts) are all .pdf files but they were not deleted in alphabetical nor size order, nor in the order that they appear in the file where they are referenced.

I'm using Jekyll 2.2.0, by the way.

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Nov 29, 2014

Don't symlink inside your destination. Rather, symlink inside your source. keep_files could help in your case, but I'd suggest you stay away from this approach.

@parkr parkr closed this Nov 29, 2014

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.