shakyShane / jekyll-gulp-sass-browser-sync

A starter project including full setup for Jekyll, GulpJS, SASS & BrowserSync
728 stars 169 forks source link

Assets, like 'fonts', 'images', on the _site folder disapear #50

Open dwadp opened 8 years ago

dwadp commented 8 years ago

When i create a folder assets inside _site folder, then i put some images and fonts in there, and the i run the gulp command, the images and font that i put are disapear. Anybody please help me??

helau64 commented 7 years ago

You'll want to be putting your assets folder in your project's root; it, and all the contents, will be copied over to _site when you run gulp. The reason they're disappearing is because _site is generated from the contents in your root – as the assets folder doesn't exist in the root, it's being removed.

dwadp commented 7 years ago

Ok thanks, heatherlauren

dwadp commented 7 years ago

Yeah, but the problem is, when the gulp command is running, and i put something in assets root folder. Its not copied into _site folder, and i have to restart the gulp command to do that. Do you know how to automatically copied all files in assets root dir to _site without restarting gulp command?

helau64 commented 7 years ago

That isn't really how it works. Gulp is a task runner, so when you run gulp, it performs a series of tasks. In this case, one of them is building the Jekyll site by copying your files into _site. While you could write your own task to have Gulp detect when a new file is added to assets and copy it over to _site/assets (similar to how changes to your Sass are detected), I can't see a use-case where it would be necessary. Just run gulp after you add your assets.