Jekyll + Github Pages is taking lots of space on my local-machine


I have been using Jekyll for a year now and using Github pages for hosting my blog.

But the problem is that now the blog directory size is more than 800 MB and it is increasing every time I publish more blogs to GitHub.

Isn’t there is any other way, as it is taking a lot of space on my local-machine.


You can use a Cloud9 account as your local environment.


what takes up 800mb? your blog posts? images? that is a lot of space for a website.


It’s the total space my blog folder is occupying.

It includes everything (images, files, post, and all other stuff of Jekyll…)


are all the images in one place? if so what is the size of just the images directory? maybe they are not well optimized?

800mb of text would be a huge amount - I think war and peace is only ~4mb as a text file.


or maybe you have a bunch of files of some type you are linking to? I like to put stuff like that on AWS S3 to get it out of the way.


I don’t, I have checked the size of the image directory and it’s just 400 MB.


@yashumittal if your images folder is 400MB, that means that because of the way jekyll generates your site, the file size would effectively be doubled, meaning 800MB. this checks out


Nope, I have checked _site folder is 0 MB


If you’re using Git look for a hidden .git folder in the repo which could be where the rest of space is.


I am not concerend that which sub-folder is taking a lot of space. Isn’t there is any alternative way to use Jekyll in the cloud itself. So, that we do not need to keep the copy on our local-machine.


Like other replies have already mentioned, static assets such as media files can increase the size of your website over time… and the solution is to host them on the Web somewhere and then link to those files via your templates.
This is not specific to Jekyll though, and can be applicable to any site on the WWW… thats the reason CDNs and various image- / video- hosting services exist.


Which service do you prefer for hosting media content online.


Firstly, are images optimized for website? Check first this (there are other applications or websites):

Then, if your website has a lot of media files, you can upload them to external host server, and share them. For instance:

  • Flickr -> Professional images
  • Imgur -> Whatever you want (50 images per hour)

It is important you upload content in the same host and associated to one account.


Have you tried running bundle clean and/or bundle exec jekyll clean ? Or remove just remove the .sass-cach manually.


Yes, I did but didn’t affect much.