GitHub Pages File Size Restrictions Running render_book

When rendering a github-pages book using render-book, github returns the following file size errors:

We think it has to do with the output functionality of github-pages for DocX and ePub, but was wondering if anyone knew of a workaround to bypass print functionality in order to complete the github-pages rendering. It is a rather large book with many graphics and GIF files. At this point is would be good to by-pass versus seeking all instances of GIFs and graphics and removing.

Your help is greatly appreciated.

James

This is a limitation of Github itself. If you have large files like the one you have, you need to store them outside of the git tree (or use Git LFS). You could store your EPUB and DOCX document in another url and provide a link to download in your HTML book.

You could also try reduce the size of all images by optimizing them in case they are too big and the source of the size to the files.

You could also try another hosting servive too with more space.

Hope it helps

In terms of bypassing, you need to modify the build.sh script to simply not create the ePub and docx files. At that point, the site, minus those downloadable files, should deploy no problem.

With the constraints of GitHub on file size, your recommendation was what we eventually had to do and it worked great! Thank you for your time and advice. James

1 Like

Hi cderv - could you elucidate on Git LFS? I haven't heard of that. Storing the file in another location is something I will investigate. Thank you for your suggestions!

I have not used Git LFS extensively so I won't be of much help. You can look at the doc site (https://git-lfs.github.com/). From Github doc this can surely be used with a Github repo (Configuring Git Large File Storage - GitHub Docs)

This would not be the first solution I would look into for this usage, mainly because it is not to store large item in Code Source but just for large item for Github pages. I would look at other ways to to host your site + file. Maybe netlify offers more storage : you can easily build and deploy automatically using Github action .

Thank you cderv for the explanation!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.