Repository storage for Large Hugo site

Hi All,
I am looking into publishing Hugo site into netlify. The only issue is, that site have lots of images and the whole site is 15GB locally.

Its a bit confusing with GitHub, GitLab and BitBucket about storage limits.
Repo will be private, and most of them stating that private repos are unlimited, but other documents are saying different things. In 2020 most of this services revised storage limits, but their supporting documents haven’t been updated considering latest changes.

Could you advise best approach for publishing large Hugo site.

ps. individual files are below 500kB.

pps. if is off-topic, please point best place to ask this question.

Git is not meant for storing a lot of binaries (images etc).
For projects under 1 GB it is doable but above that no.

Have a. look at Git LFS (Large File Storage) and the GitHub documentation: About Git Large File Storage - GitHub Docs

You would need to purchase additional storage on GitHub for Git LFS: About billing for Git Large File Storage - GitHub Docs

I do not use the other Git providers you mentioned.


Another option would be to have a look at a service like Cloudinary to host the project’s media, it’s not cheap but they have a free plan with a 25 GB storage limit.

2 Likes

If your only problem is GitHub etc. repo limitations, you could consider partition your content/images into smaller GitHub repos and include them in the main repo using Hugo Modules. I do, however, remember vaguely that there may be an upper size limit per Hugo/Go module as well (I think 2GB), but there is no limitation to how many repos you can have.

1 Like

Thanks.
That could be an idea.
Assume that on Netlify (or any other provided) during build imported modules are merged into one location.

How the local development looks like?
Assume that I will need to push each repo individually, but when working on ‘hugo serve’ ?

/root/ .git (1st repo)
/root/content/images/2020/ .git (2nd repo - ignored when pushed 1st repo, 2nd repo need to be pushed individually)
/root/content/images/2021/ .git (3rd repo - as above)

is that correct assumption?

Yes that works seamlessly. You can mount each module wherever you want it in /content, /static, /assets etc.

There are 2 ways, but I usually just point the modules I work on to a local folder using the replacements option (via OS env var when running Hugo server):

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