December 8, 2020
Blog is moving soon and "beta" announcement
The new blog is sharing a CI/CD built for my self-hosted services (like Jabber server, Blog, Mail, Jitsi meet, Mumble and others). Currently I use a Gitlab-based deployment with an orchestrator repo, makefile per service and private docker registry for container images. All services are containerized for isolation and ease of moving around. It's grown evolutionary, but resembles a k8s, so I've plan to move to k8s, maybe in end of December.
I've patched blog2md to correctly export comments too, see details. All 220 posts in the hugo-based blog are exported from blogger using this, without much modifications afterwards. Some are still needed, mostly related to preformatted code from pre blocks. I did not made match to blog2md yet and not sure if I will ever as they're pretty minor.
Labels: blog, blogger, CD, deployment, gitlab, hugo, k8s, kubernetes, selfhosted, ungoogle
January 7, 2020
Blog migration to hugo
Sharing here some experience in process (will update this post until done).
TL;DR:
- Install latest hugo with snap
- Find and install theme (with git submodule - see below)
- Try blog with "hugo server ..."
- Setup publishing pipeline on blog changes (for example, Jenkins or whatever is preferred).
- Install blogger_to_hugo migration tool
- (This one is not specific to anyone I suppose. I don't want to experiment with lots of new packages in my main macos system, so installing debian 9 as vbox VM. All further is done there).
- Run migration from blogger backup with blogger_to_hugo. I got an error:
TypeError: object of type 'NoneType' has no len()
Seems like it expects only the english post titles (or maybe texts in english too) and crashes otherwise. Too bad. - Use blog2md which produces a bunch of .md files (not sure about non-english titles, but no crash at least).
- Install and try to use zzo theme. It turns out that hugo 0.58 is not compatible. Although it's latest in debian sid (unstable) repo!
- Use snap installer (another repo to think of..): snap install hugo
- Hmm, zzo theme does still not work showing bunch of "render of 'page' failed..." errors and crashing in the end. Could be a non-english titles.
- Trying a hugo theme pure.
- Copy and edit config from example site of a chosen theme.
- Use git submodules for themes if your blog is in git (which itself is a great idea too!) like:
git submodule add https://github.com/SOME/THEME themes/THEME
- Use snap (it's in bad ones too) - to experiment only.
- TL;DR: always use system packages, do not install binaries.
I strongly advocate against using a zoo of repo managers (read: snap, pip, etc - whatever non-native to your OS updates subsystem) or binaries to anything running in runtime at server. It takes huge amount of maintenance to track of major updates. Most probably you would miss serious vulnerability at some point. Even old version of packages in debian stable receive security fixes (they are backported), which you would need to do yourself manually for any separate repo manager not added to your cron (most probably manually too). - Test your hugo+chosen theme with all desired charsets before everything else. It's really hard to believe that modern software written in golang crashes for a non-ascii (read: utf-8 or cp-1251), but that's what happens to hugo with some themes.
- Good old backslash escaping is not what works in yaml out of the box. To escape apostrophe (single quote) use '' (yes, type it twice). Enjoy this good reading before going bed (do not): https://yaml.org/spec/1.2/spec.html
April 27, 2019
Is Medium a noise-based platform?
"This image has nothing to do with the article, but Medium recommended to add a picture ¯\_(ツ)_/¯".
Hey. Stop. If this has nothing to do with your article, why the hell did you add it? I don't care about my bandwidth, but it still consumes screen space (even blocked - it's blank space) and it's noise as author just sincerely wrote.
This shall not be the modern web. Yet Medium is a profitable company! I now still use Blogger which shares founder with Medium. But Blogger was and is not that bad!
Just to give some clue of how much noise is on the first page of a regular Medium-based blog here's a screenshot (hint: everything is a noise!):
UPD: typos, formatting.
Labels: blog, blogger, internet, marketing, medium, noise, web