jekyll/jekyll

Directories in keep_files are cleaned if their parent is empty

robwierzbowski opened this issue · 3 comments

For example, if I

  1. create a directory assets/generated in _site, and fill it with files
  2. add assets/generated to keep_files
  3. do not create an assets directory in the Jekyll source directory, or create one but leave it empty
  4. run jekyll build

the directory assets/generated is cleaned.

I'm not sure the best way to handle this. We wouldn't want to keep parent directory files if there were any, but we want to prevent the assets from being removed if assets/generated is listed in keep_files.

We're having the same problem with watching where a destination is a subdirectory of a subdirectory. We need to walk up until source and keep the folders there but delete the files.

Referencing the site destination issue: #1184

Woohoo! 🍸 🚀 🌟