Moved to Sourcehut! March 4, 2023 on peregrinator's blog

I wrote to Drew DeVault a couple of days back, after much deliberation on whether I should really bother him and the like, about free access to Sourcehut builds so I could move away from Github and Gitlab. He responded soon after that saying that he’d given me a year’s access. And I’ve finally done it! The blog that started off titled peregrinator’s sourcehut site along with an explanation on why it was called that while hosted on Github-pages is finally here! The next step would be to move to a personal or custom domain of my own, but that’s a long way into the future, yet.

In any case, this brings me closer to what I’ve got planned for my internet presence — minimal and without JavaScript. Although I’m pleased with how this has simplified a lot of things, this also means a few new things to keep in mind for me and this is perhaps of most interest here.

Git

I’ve been honing my command-line git skills over the last few years but since repository settings are threadbare on Sourcehut, I’ll have to really step up my game here. I’ve already faced some minor setbacks to my work, on this blog incidentally. I’d gitignored the folder with the Org-mode sources for all of my blog posts and other pages and then checked out an older version of my blog posts source from the last commit with the file. Since this was from prior to adding gitignore functionality, it was at-least an entry older with a bunch of crucial changes I’d made yesterday. I had to manually recover this eventually.

Maintaining multiple branches, juggling remotes - since this shares its files with those from my older Github-pages site — all was a bit overwhelming initially but I’ve managed to clean up most of the cruft and I’m starting to get more confident around git.

Content restrictions

The biggest “hit” I’ve taken is the restrictions on third-party content - see Albums of the Year, my last post for example. The Sourcehut site documentation states that they disallow external style-sheets, especially those accessed via CDNs but crucially third-party embedded content.1 This shouldn’t mean much to most - especially if the content of blog posts is text and some code - but since some of my posts are about music, I find that this restriction gets in my way. I cannot add embedded albums or tracks Bandcamp. Bandcamp is what I prefer when it comes to music since they’re the most artist-friendly amongst streaming platforms.2

I’ve since changed my Bandcamp shortcode from a minimal, single positional argument based kind to one that uses an additional URL rendered as a simple link below the iframe. Of course, with Sourcehut pages, the iframe is just a blank rectangle of the same dimensions as the embedded Bandcamp content.


Find them on <a href="{{ .Get "url" }}">Bandcamp</a>
<iframe style="border: 0; width: 400px; height: 42px;"
    src="https://bandcamp.com/EmbeddedPlayer/album={{ .Get "id" }}/size=small/tracklist=false/bgcol=ffffff/linkcol=0687f5/transparent=true/" seamless>
</iframe>

  1. See the documentation for Limitations with Sourcehut sites at https://srht.site; the rest don’t affect me as much ↩︎

  2. Citation? ↩︎

Have a comment on one of my posts? Drop me toot at @peregrinator@fosstodon.org or by starting a discussion on my public inbox by sending an email to ~peregrinator/public_inbox@lists.sr.ht. Make sure to go through sourcehut mailing list etiquette if you haven't already.

Articles from blogs I follow

Burnout

It kind of crept up on me. One day, sitting at my workstation, I stopped typing, stared blankly at the screen for a few seconds, and a switch flipped in my head. On the night of New Year’s Eve, my backpack was stolen from me on the train from Berlin to Amste…

via Drew DeVault's blog May 1, 2023

HDR hackfest wrap-up

Last week I’ve been attending the HDR hackfest organized by Red Hat. The trip to Prague was rather chaotic: the morning right after the SourceHut DoS incident, I got a notification that my plane was cancelled, so had to re-book a new flight and hotel. The…

via emersion May 1, 2023

Wives and Lives

Some thoughts on being a gaysian immigrant to California Two weeks ago, I helped to plan and organize a Lunar New Year dinner for 120 queer and trans Asian people. It’s a tradition that has been around for as long as I’ve been alive: the annual APIQWTC Ban…

via Pop22 April 25, 2023
generated by openring