I refactored GoBlog to avoid global variables wherever possible (with the goal to make it easier to create unit tests) and I hope I didn’t introduce any new bugs. 🤞
Tags: GoBlog
📍 Post locations
My evening project today was to develop a feature to display post locations in GoBlog, for which I created a custom Go module (100% test coverage!) that roughly parses geo-URIs according to RFC 5870. Nice feature for when the location should be relevant for the post context or I want to save where I shared a photo. An example in this post. 😉
Modularizing GoBlog?
I just separated the function I told you about the other day (the one for marking text with “==”) as a Go module. This way the main code remains more organized and if I don’t need the feature any more, the module is still usable. Also for other people who might need the same functionality. I think I should modularize GoBlog even more. 🤔
Promoting the use of Tor
You might have discovered two new links in the footer of my blog or homepage. “🔓 Connect via Tor.” and “What is Tor?”. I now try to promote the use of Tor with GoBlog.
I have already written about my blogroll several times. After I automated it with Hugo and was also able to implement the automatic creation with GoBlog, I have now significantly improved the integration in GoBlog. Blogroll support is now directly in the application, hopefully supports other services besides Miniflux and there is an OPML download now. Blogrolls rock!
Documenting my stupidity
Something stupid happened to me yesterday. On my post with the cake photo I got a few responses and comments that I wanted to look at. But on the smartphone display, I seem to have slightly mis-clicked and accidentally pressed “Delete”. That’s a button that only shows up when I’m logged in.
The post was then deleted and I had to use the hourly database dump to find the entry again and add it back into the database by hand.
To counteract this in the future, I have now created a second deletion step. Now the deletion must be confirmed a second time.
I also now use the European cloud provider Scaleway to store the Docker image (instead of Quay.io). I already use Scaleway for object storage for my backups, unfortunately Hetzner does not offer such features yet.
Advanced Blogstats
This evening I had a little fun with SQL and JavaScript. Now it is possible to see the number of posts without date in my blog statistics (en/de), but also the number of posts in each month of each year. By clicking on the year, the months are displayed.
It would not have needed JavaScript in the frontend, would there be something like summary/details for tables. But at least it’s less than 1 KB of JavaScript.
Find broken links with GoBlog
Even though it is often said that the Internet does not forget, it does forget some things. When people shut down their websites, delete sites or even sell their domains.
Tor support in GoBlog
I don’t know of any other blogging software that supports this: Serve a blog directly as a Tor hidden service.
I have this on my to-do list for quite some time already: More documentation for my blogging software GoBlog. GoBlog is still changing from time to time and probably needs a bit of refactoring before creating a release. But a first step to offer more documentation is adding an example configuration, which I just did. I hope this helps all those curious people who wanted to try GoBlog. Feel free to contact me with questions!