This probs has been asked a lot before, but I simply couldn’t find an answer myself, so I’m asking anyways…
First some context.
I have a repository for hosting files for my website and one for hosting my blog. While the website uses jekyll is the blog using another software for various reasons.
I do have a setup that automates the building process for the website and also the blog itself. For this question is only the website one important, which you can find here
From what I understand is jekyll cleaning the _site
directory when building (or serving) the site. This would also include the blog
folder generated and added by the blog repository.
My question now is, what would be the right configuration within jekyll to prevent it from deleting this folder, if that is doable.
I’ve seen from some google searches that there is the keep_files: [DIR, FILE, ...]
option, but I have 2 problems with it.
- It’s not entirely clear to me on what the syntax for a folder would need to be here. Is it just
blog
or would I need to include a trailing/
to indicate a folder rather than a file? - From further searching does it seem like this option works reliable or as assumed it would? Seen a few posts reporting files still being deleted despite being defined in the option.
So… yeah. What’s the right configuration here?
The _config.yml
I currently use is found here