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.
I didn’t know it was made specifically for the video… It’s been turning up in my mind at a regular interval for years.
Also, added soundcloud embeds! Works the same way as the bandcamp embed by getting the track url and extracting embed url, track name etc.

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.
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…

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.
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…
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…
Show postHide 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.
Background music from some yt video on DIY guitar pickups reminded me…
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.
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.
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. Immediately obvious TODOs from attempting a first post: 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.Read More
read morefunctionality as a shortcode.
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.
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):
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.


