Page meta

@meta

Thoughts on developing and using a microblog

https://github.com/SarahAlroe/gohost/

Page meta @meta 8 Oct 2026, at 23:54

Added at and tag shortcodes, so that posts and more can reference existing tags like #Current Brainworm #Microcasette , or existing section like @tmp @gfx . I’ve also extended the vs code snippet generating script to enable autocompletion of both. Idk I think it’s neat.

Page meta @meta 27 Sep 2026, at 14:24

Edit page button

Added edit page buttons to posts and sections based on this dev.to post. Combines nicely with the reply tasks in-editor, so you could navigate back to an older post, click to edit, and then run the Reply... or Reply here tasks.

Page meta @meta 13 Sep 2026, at 22:58 Page meta @meta

Page meta @meta 13 Sep 2026, at 21:59

I wrote a little python script using the frontmatter package to generate a vs code snippets file from the tags of existing posts, so that I can ctrl + space in the frontmatter to add existing tags. I’m enjoying the whole infrastructure building thing…

The auto-generated snippets in editor.
Read More

The script for anyone curious:

#!/usr/bin/env python3

import os
import frontmatter
import json

tags = set()

for root, dirs, files in os.walk(r"./content/"):
    for n in files:
        fp = os.path.join(root, n)
        with open(fp, "r", errors="ignore") as f:
            post = frontmatter.load(f)
            if 'tags' in post:
                for tag in post['tags']:
                    if tag:
                        tags.add(tag)

print(tags)
snippetObj = dict()

for tag in tags:
    snippetObj[tag] = {
        "scope": "yaml",
		"prefix": tag,
		"body": "- " + tag
    }

with open(".vscode/tags.code-snippets", "w") as f:
    f.write(json.dumps(snippetObj, indent=4))

And then "runOn": "folderOpen" in the tasks.json to make it rebuild on opening the editor.


Page meta @meta 13 Sep 2026, at 22:58

Oh I’m having a bit of fun with this. Added another one for autogenerating shortcode snippets. Currently only clever enough to add a closing tag if the file uses .Inner, but hey, still an improvement to ease of writing.

Read More

I added glob matching to manage if different themes are used:

#!/usr/bin/env python3

import os
import glob
import json

snippetObj = dict()

for path in glob.glob(r"./themes/*/layouts/*shortcodes"):
    for root, dirs, files in os.walk(path):
        for n in files:
            fp = os.path.join(root, n)
            with open(fp, "r", errors="ignore") as f:
                shortcodeName = n.replace(".html", "")
                print(shortcodeName)
                body = "{\{<"+shortcodeName+" ${1:$TM_SELECTED_TEXT} >}}"
                if '.Inner' in f.read():
                    body = "{\{<"+shortcodeName+" $1 >}}\n${2:$TM_SELECTED_TEXT}\n{\{</"+shortcodeName+" >}}"
                snippetObj[shortcodeName] = {
                    "scope": "markdown",
                    "prefix": shortcodeName,
                    "body": body
                }
            
with open(".vscode/shortcodes.code-snippets", "w") as f:
    f.write(json.dumps(snippetObj, indent=4))

Oh right… Not executing but correctly rendering a shortcode within a code tag within a shortcode is apparently just not an easy thing. I gave up, if you wanna use the code above, remove the added backspaces within the curly brackets…

About the cleverness of the script, it might be easiest to just have a comment in each shortcode with the snippet body specified…

Page meta @meta 7 Sep 2026, at 21:32

Realizing that I need to add both a styled audio player and a spoilers / content warning shortcode for a thing I want to post…

Update: working on it…

Content warnings for: Testing 123
Show post
Hide post

Yea that part works now. The audio player thing, I just gotta get into a working state. Appears styling the audio tag is not really a thing. So if you want custom players, you gotta do js stuff, which I was trying to avoid for broader support.

Page meta @meta 24 Aug 2026, at 22:54 Personal @self

Personal @self 24 Aug 2026, at 21:08

Background music from some yt video on DIY guitar pickups reminded me…


Page meta @meta 24 Aug 2026, at 22:54

Way to go sniping myself with figuring out a neat way to do bandcamp embeds. Turns out you can getRemote the url of what you want to embed and then likely find relevant embed links and data in the meta tags using findRESubmatch. Don’t forget to safeURL it!

If you don’t mind the loss of interactivity you could get rid of the iframe entirely by extracting the track info and album cover to host locally… Later.

Page meta @meta 24 Aug 2026, at 00:57

Pagination

It was becomming necessary, so I added rudimentary pagination using HUGOs inbuilt solution. This means replyTos don’t currently count, which might need fixing at some point…

Also I should probably add some little js thing to collapse long reply chains with some readmore buttons.

Page meta @meta 9 Aug 2026, at 18:09 Page meta @meta

Page meta @meta 4 Aug 2026, at 00:27

From writing a first post

Okay this thing has been in the works for a bit… And on the backburner for much longer. The general idea is just to have some place to put things that I’d want to share, or might be useful for others.

Read More

Immediately obvious TODOs from attempting a first post:

  • Add the read morefunctionality as a shortcode.
  • Fix up image rendering.
    • Do auto-processing of images so I can paste without care. Also a shortcode thing..
    • Specifically, clear EXIF data and such…
    • Click-to-maximize.. With higher resolution versions?
    • Add gallery view style rendering…

Also I’m not used to spur-of-the-moment writing. Interesting exercise. Also, doing proper automations for creating posts etc was a good idea.


Page meta @meta 4 Aug 2026, at 22:47

Okay gallery shortcode implemented.

Read More

Readmore shortcode as well… Currently using the details html tag to have a js-free solution. Seems to work fine, as long as the button doesn’t need to move to the bottom. Wondering if that could be solved with css as well…

Next up… Better image rendering? The building the plane as it takes off approach is pretty neat tbh.


Page meta @meta 9 Aug 2026, at 18:09

Okay, image rendering is in a workable state now. I also fixed up the front page to show sections properly (and added a right hand sidebar):

Screenshot of sections list

Some obvious next steps:

  • Don’t convert png’s if smaller output.
  • Automatic read-more solution to shorten replied-to posts?
  • Return to main page button if header disabled.
  • Figure out tags and comments.
  • RSS feeds for everything.
  • Video shortcode.