Devlog: Blogging Tools - Podcast Clip Favourites

Back on Blogging Tools. Gave up on trying to set a remote ref: all the ones I’ve tried were not working. Looking at the examples it looks like I can call Push with defaults (apart from authentication which looks like I’ll require with my repo). Gave it a try and that looks like it worked. I peeked in the source code and the default ref that work was the following:

DefaultPushRefSpec = "refs/heads/*:refs/heads/*"

Turns out by adding refs/remote/origin/… I was using the default pull ref. I suppose I should learn more about how Git works in this respect. But later, it’s working now. That’s all I need. Finishing off the Blogging Tool side of things by moving all the hard coded values to the config, and I think this is ready to go.

Turning to the Hugo site. I’ve started a new site from scratch, which does little than just push to Netlify. Same template and same changes I’ve made for the test site. I don’t love the template, but I think it’ll work for now.

Created a new site and installed the theme. Set the menu and cleared the footer as per this Hugo config:

baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'Podcast Favourites'

theme = 'hugo-flex'

[params]
footer = ""

[[menu.main]]
name = "Clips"
pageRef = "/about"
weight = 1

[markup.goldmark.renderer]
unsafe = true

Produces this nice clean home page:

2025-10-06 21.25.37 localhost 48f16a06173b.png

Added CI/CD to build the site and deploy it to Netlify. All seems to work.

Merge changes in Blogging Tools, pushed to Forgjo, and redeployed in Coolify. Status is degraded. Reason is that the temp directory, which is where the workspace for the Hugo site’s Git repo, doesn’t exist:

CleanShot 2025-10-06 at 21.48.17.png

I forget that this is deployed in a scratch container, which has no guest OS. So creating the /tmp directory is something I’ll need to do. Will add a quick bit of logic to Blogging Tools to do this prior to creating the Git provider.

Actually, no. Change of pace. I’ll do it in the Docker file. What I’ll do is touch a file in /tmp during the build phase and just copy it over to scratch (I can’t do this in scratch as it doesn’t come with executables). This should force the directory creation.

RUN touch /tmp/t
    
# ---------  
FROM scratch  
  
COPY --from=builder /tmp/t /tmp

Redeployed and… what?

CleanShot 2025-10-06 at 21.58.54.png

Oh, that’s meant to be:

COPY --from=builder /tmp/t /tmp/t

Copying directly to /tmp makes a new file with the filename tmp in /.

Okay, Blogging Tools is working again. Let’s try it out.

Ah, error: author field is required. I need to set this for the commit call. That may be why the commit author was me and not the bloggingtools user when I was testing this on my own machine.

Trying again. Hey, success! Blogging Tools added the clip to the repository and pushed the changes as the bloggingtools user. This kicked off the CI/CD to rebuild the Hugo site and pushes it to Netlify. Did forget to fix the base URL add the Hugo template for making the audio playable, but fixed that and now the clip is playable.

Pasted image 20251006222338.png

Nice! Calling this feature done. I will need to style the Hugo site, but I’ll do that over time. It’s getting a bit late and I want to wrap this up.