I'm building a site with Jekyll for the first time. I'm loving it so far; my only problem is the exceedingly long build times. Right now, when I run jekyll build
, it takes about 30 seconds to generate the site.
30 seconds might not seem like a lot, but at the moment, the entire site only has ONE post, 8 includes, 8 layouts, and 2 small plugins. I haven't abused liquid tags to my knowledge, and if I remove the plugins, it still takes just as long.
When searching for an answer, all I can find are people who have huge blogs with hundreds of posts. Since I only have one post, that's obviously not the issue - there's something else going on here to make it take so long.
Here is my site's github repository: https://github.com/keithpickering/kpd/
My questions are as follows:
What are some possible reasons for Jekyll building so slowly when it doesn't have all that much to build?
If Jekyll is just inherently slow, is there a simple way to compile my CSS and JS separately, leaving Jekyll to deal with just the markup? Right now I have Jekyll ignore my "css" and "js" folders, instead having Grunt minify, prefix, and compile those files automatically. I've also never used Grunt before so I have no idea if this is some sort of absurdly hacky solution that I'm using.
Thanks for the help!
EDIT: Should've mentioned this sooner, but I'm on Windows 8.1 x64. I'm beginning to think Jekyll just has shaky support for Windows.
I ran into a similar problem, but luckily found the reason and a solution:
My jekyll setup wasn't using any plugins, no complicated liquid tags, only contained 3 sample posts and nothing else. But building the site still took 6 seconds on average.
Only when I removed everthing in the directory step by step I found out what was causing the long build times: the node_modules
folder.
You can exclude the node_modules
directory from the jekyll conversion by putting the following in _config.yml
:
exclude: [node_modules]
Or:
exclude:
- node_modules
More information about exclude
can be found in the jekyll documentation.