← Back to context

Comment by dv35z

5 days ago

I'm wondering if someone can help me brainstorm my setup -

How to handle images & video content, when using git to track files? I'll explain my setup...

My vision is a somewhat "lo-fi" and 10+ year durable system - so even my "CI/CD" is more local, in the form of shell scripts, rather than remotely (like GitHub Actions)

I have a folder, that's basically my-website.com, and it has a folder `docs` for content (that's `mkdocs` default content folder). The top level directory is a git repository, which is pushed to Codeberg (code repository, similar to GitHub).

As a content editor, I currently use VSCodium (open-source VSCode) + FOAM (clone of ROAM, similar to Obsidian, which lets you cross-link Markdown files with Obsidian-style links [[MyLink]]. To be specific here, on MacOS, I created a shortcut to the website folder on Finder, and I drag that onto the VSCodium app icon, when I want to write. It's a pretty easy workflow on my computer (not practical on mobile)

I use MkDocs to generate the HTML site. I use a simple deploy script to run `mkdocs build` and `aws s3 sync` to copy the files to an AWS S3 bucket.

This all works pretty well, but I'm now trying to figure out how to handle photos & videos.

To give an example, I would have something like `~/_Websites/my-website.com/docs` and inside of that I would have `journal/2025/04/2025-04-23.md` as a journal entry. Related photos and videos, I use `journal/2025/04/media` - so its sort of a catch-all for all the media files for the month.

Recently, I added some large videos (unrelated: but I'm recording video of my CNC router doing cool stuff), and quickly realized

(1) Git is not the right spot for large media (I knew this, but just hadn't hit the problem yet - seeing how long `git pushes` take).

(1.1) I actually have a broken repo right now, as I committed video files into it, and can't `git push` without the network connection being cut. I think it may be on the Codeberg side, because they have a limit of 1 GB per repo.... So I'm also trying to figure out how to back out the change, get the video file out of there, and arrive to a better solution.

(2) After reading `git-lfs` (Git Large File Storage) website several times, I can't quite figure out how to integrate it - or IF I should integrate it.

(3) Now, I'm noodling on having something like a `MEDIA.my-website.com` directory, which is basically a non-git-tracked folder structure of photos/videos, which I would then rsync to a separate S3 bucket - and then website content could reference it. However - I'm fearful that over time, the markdown content and the media site would be out of "sync" - I frequently re-organize content as needed. For example, I might start with a `python` folder, and a `java` folder, but then later create a top-level `programming` folder. I could see doing the same with the media folder too. `padel` and `squash` folder (containing video clips of games, how-to's) might be grouped under a `sports` folder, and so on. Dragging these folders around while the media content is inside the folder usually doesn't cause problems, because of relative links. However when the content & media are in different file structures, broken links would happen - and this reduces the "fluidity" / increases friction in naturally re-organizing the site with time.

To conclude: - How to handle video media with git tracked markdown content?

Anyway! I appreciate your patience in reading this, and hope you get the idea of the setup - curious what folks who have been down this route can recommend.