JanDW / wildpeaches

Mind-sized STEM ideas and experiments blog, beyond the textbook.
https://wildpeaches.xyz
0 stars 0 forks source link

Check images into Git LFS #109

Closed JanDW closed 3 years ago

JanDW commented 3 years ago

https://git-lfs.github.com/

JanDW commented 3 years ago

https://docs.github.com/en/github/managing-large-files/working-with-large-files

checked in .gitattributes setting up LFS for png, jpg, jpeg, gif,svg in a21c460

JanDW commented 3 years ago

I set up "large file storage", which I set it up for images (with extensions png,gif,jpg,jpeg,svg). It keeps the images out of the repository, and stores a file with a pointer to them to Git LFS instead. It keeps the repository lean and fast. It does add complexity though.

I figured that would be largely hidden from John as Github Desktop supports Git LFS out-of-the-box. But ah yeah, what about Netlify? Well, they do support it. But the assets seem to get uploaded to their servers at time of pushing to GitHub, bringing with it a dependency on Netlify Dev. Additionally, It looks like we'd need to get on a paid tier of their plan, and that's a little steep. Ugh.

Anyway, I have some possible solutions to explore, (using Cloudinary, or Netlify CMS) but I'm dreading the prospect a little. I'm heading into the territory I despise about "modern web development" where every solution comes with three new problems for free.

JanDW commented 3 years ago

Some resources for Elventy with Cloudinary:

Git LFS https://www.mankier.com/1/git-lfs-fetch https://docs.github.com/en/github/managing-large-files/versioning-large-files

Performance https://timkadlec.com/remembers/2020-11-17-netlify-proxy-requests/

Eleventy plugin https://www.npmjs.com/package/eleventy-plugin-respimg https://www.npmjs.com/package/eleventy-plugin-cloudinary https://www.npmjs.com/package/eleventy-plugin-responsive-images https://www.npmjs.com/package/eleventy-plugin-images-responsiver

Cloudinary setup https://twitter.com/philhawksworth/status/1328340868726726656 https://css-tricks.com/cloudinary-fetch-with-eleventy-respecting-local-development/

Netlify https://www.netlifycms.org/docs/cloudinary/ https://www.netlifycms.org/docs/netlify-large-media/

Netlify community https://community.netlify.com/


Paul Robert LLoyd uses git LFS with cloudinary, so might want to investigate his repo

JanDW commented 3 years ago

Abandoning git lfs for now. Was using lfs and netlify large media, but both are disabled now. Netlify large media only is supported for one user on the free plan.