💾 Archived View for loomcom.com › gemlog › file-publishing.gmi captured on 2024-05-26 at 14:38:19. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Publishing Files To Capsules

There has been a lively discussion on the Gemini mailing list about how people update files on their Gemini capsules, and there have been some good ideas. It's got me thinking about how it could be made easier for anyone who wants to get involved, regardless of their technical level.

Full disclosure, I'm doing it in the worst way possible right now. Since Gemini reminds me so much of the World Wide Web in 1993 or 1994, I'm reliving my misspent college years and publishing my Gemini pages exactly the same way that I published HTML pages in 1993 and 1994. Yes, that's right, I'm editing my pages live, on the server, just like in the bad old days.

Sure, it's a little nostalgic, but it's definitely not "best practice"!

Anyway, the most popular suggestions on the mailing list involve using `git` to publish a complete capsule, and I like that idea a lot. It's made me wonder about whether a post commit hook could be used to publish from your favorite Git repository to a server, but so far I haven't come up with a great answer as to how to handle authentication cleanly. I'm sure I just need to look further into it.

But I also think there's room here for better hosting software. I kind of want to experiment with cobbling together a multi-account WebDav server setup that people of any skill level can sign up for. Privacy would have to be handled very carefully, of course. The last thing I want to do is be responsible for handling user passwords and email addresses, who needs that hassle? But maybe you could use third party authentication. Again, I'm not sure, I need to look further into it.

UPDATE

Well, as an experiment, I've decided to use Git in my publishing workflow as well. I used rsync to copy my complete Gemini Capsule to my computer, and then created a git directory:

rsync -av me@host:/var/gemini/ ./gemini/
cd gemini
git init
git add .

Then I created a file called ".git/hooks/post-commit" with the following:

#!/usr/bin/env bash

echo "Syncing Capsule..."

rsync -av --delete --delete-after \
        --exclude .git $(pwd)/ me@host:/var/gemini/

Now I can edit my files locally, and whenever I made a change and commit it to git, my site is published! Cool beans.

Links

Gemini Mailing List: "Storing Capsule Pages?"

Back Home