Skip to content
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

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

Open
dwadp opened this issue Sep 9, 2016 · 4 comments
Open

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

dwadp opened this issue Sep 9, 2016 · 4 comments

Comments

@dwadp
Copy link

dwadp commented Sep 9, 2016

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
Copy link

helau64 commented Sep 11, 2016

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
Copy link
Author

dwadp commented Sep 12, 2016

Ok thanks, heatherlauren

@dwadp
Copy link
Author

dwadp commented Sep 12, 2016

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
Copy link

helau64 commented Sep 16, 2016

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.

@dwadp dwadp closed this as completed Sep 17, 2016
@dwadp dwadp reopened this Sep 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants