From 7969d45f28dd2d3c4986a901c971c989d3e2751b Mon Sep 17 00:00:00 2001 From: wgroeneveld Date: Mon, 10 Jun 2024 13:47:57 +0200 Subject: [PATCH] visualizing blog post links with obsidian: finished + rework tags --- .../post/2020/09/486-performance-analysis.md | 1 + content/post/2020/09/486-upgrade-sd-hdd.md | 1 + .../post/2020/09/486-upgrade-sound-blaster.md | 3 +- content/post/2020/09/reviving-a-80486.md | 2 + .../11/win98-upgrade-sound-blaster-audigy.md | 2 +- .../11/winxp-upgrade-sound-blaster-xfi.md | 2 +- .../post/2021/01/win98-upgrade-geforce3.md | 2 +- content/post/2021/10/ditch-scrum.md | 1 + .../capturing-vga-output-from-dos-on-winxp.md | 3 +- .../remakes-and-remasters-of-old-dos-games.md | 1 + ...sualizing-blog-post-links-with-obsidian.md | 60 ++++++++++++++++--- content/tags/_index.md | 5 +- .../layouts/_default/rss.xml | 15 +++-- 13 files changed, 73 insertions(+), 25 deletions(-) diff --git a/content/post/2020/09/486-performance-analysis.md b/content/post/2020/09/486-performance-analysis.md index a0e97627..9b856f03 100644 --- a/content/post/2020/09/486-performance-analysis.md +++ b/content/post/2020/09/486-performance-analysis.md @@ -5,6 +5,7 @@ bigimg: gtacrash.jpg date: 2020-09-26 tags: - am486 + - pc hardware categories: - retro --- diff --git a/content/post/2020/09/486-upgrade-sd-hdd.md b/content/post/2020/09/486-upgrade-sd-hdd.md index 8e9ddd9c..dc63cb43 100644 --- a/content/post/2020/09/486-upgrade-sd-hdd.md +++ b/content/post/2020/09/486-upgrade-sd-hdd.md @@ -4,6 +4,7 @@ date: '2020-09-23' subtitle: "Getting tired of loud hard drives? Here's a flash solution." tags: - am486 + - pc hardware categories: - retro --- diff --git a/content/post/2020/09/486-upgrade-sound-blaster.md b/content/post/2020/09/486-upgrade-sound-blaster.md index 5970dafa..dda6ebd8 100644 --- a/content/post/2020/09/486-upgrade-sound-blaster.md +++ b/content/post/2020/09/486-upgrade-sound-blaster.md @@ -3,9 +3,8 @@ title: "486 Upgrade 1: Sound Blaster 16" date: '2020-09-18' subtitle: "A Classic ISA sound card, including MIDI daughter board!" tags: - - expansion card - soundblaster - - am486 + - pc hardware categories: - retro bigimg: sndblaster.jpg diff --git a/content/post/2020/09/reviving-a-80486.md b/content/post/2020/09/reviving-a-80486.md index 7e68230f..c13421c9 100644 --- a/content/post/2020/09/reviving-a-80486.md +++ b/content/post/2020/09/reviving-a-80486.md @@ -4,6 +4,8 @@ date: '2020-09-03' subtitle: "27 years later, does it still work?" tags: - am486 + - pc hardware + - dos categories: - retro --- diff --git a/content/post/2020/11/win98-upgrade-sound-blaster-audigy.md b/content/post/2020/11/win98-upgrade-sound-blaster-audigy.md index 5afad455..841e7adb 100644 --- a/content/post/2020/11/win98-upgrade-sound-blaster-audigy.md +++ b/content/post/2020/11/win98-upgrade-sound-blaster-audigy.md @@ -3,9 +3,9 @@ title: "Win98 Upgrade: Sound Blaster Audigy" date: '2020-11-24' subtitle: "From a Cheap PCI128 To EAX Advanced HD" tags: - - expansion card - soundblaster - win98 + - pc hardware categories: - retro bigimg: audigy.jpg diff --git a/content/post/2020/11/winxp-upgrade-sound-blaster-xfi.md b/content/post/2020/11/winxp-upgrade-sound-blaster-xfi.md index cf690b9b..16387eda 100644 --- a/content/post/2020/11/winxp-upgrade-sound-blaster-xfi.md +++ b/content/post/2020/11/winxp-upgrade-sound-blaster-xfi.md @@ -3,9 +3,9 @@ title: "WinXP Upgrade: Sound Blaster X-Fi" date: '2020-11-08' subtitle: "From Embedded Realtek To EAX 5 Blasting Sound" tags: - - expansion card - soundblaster - winxp + - pc hardware categories: - retro bigimg: xfi.jpg diff --git a/content/post/2021/01/win98-upgrade-geforce3.md b/content/post/2021/01/win98-upgrade-geforce3.md index 03bd0911..5d00920d 100644 --- a/content/post/2021/01/win98-upgrade-geforce3.md +++ b/content/post/2021/01/win98-upgrade-geforce3.md @@ -3,9 +3,9 @@ title: "Win98 Upgrade: GeForce 3 Ti200 vs Riva TNT2" date: '2021-01-28' subtitle: "Get more out of that AGPx4 slot!" tags: - - expansion card - geforce - win98 + - pc hardware categories: - retro bigimg: geforce3.jpg diff --git a/content/post/2021/10/ditch-scrum.md b/content/post/2021/10/ditch-scrum.md index 5ccea7f4..6cbbf1f5 100644 --- a/content/post/2021/10/ditch-scrum.md +++ b/content/post/2021/10/ditch-scrum.md @@ -4,6 +4,7 @@ date: 2021-10-22T13:42:00+02:00 categories: - programming tags: + - software engineering - agile - scrum --- diff --git a/content/post/2022/11/capturing-vga-output-from-dos-on-winxp.md b/content/post/2022/11/capturing-vga-output-from-dos-on-winxp.md index dc23b858..6fc9eae9 100644 --- a/content/post/2022/11/capturing-vga-output-from-dos-on-winxp.md +++ b/content/post/2022/11/capturing-vga-output-from-dos-on-winxp.md @@ -2,11 +2,10 @@ title: "Capturing VGA Output From DOS On Windows XP" date: 2022-11-30T10:00:00+01:00 tags: - - expansion card - screenshots - winxp - dos - - am486 + - pc hardware categories: - retro --- diff --git a/content/post/2024/04/remakes-and-remasters-of-old-dos-games.md b/content/post/2024/04/remakes-and-remasters-of-old-dos-games.md index 5f897ed5..19d07080 100644 --- a/content/post/2024/04/remakes-and-remasters-of-old-dos-games.md +++ b/content/post/2024/04/remakes-and-remasters-of-old-dos-games.md @@ -5,6 +5,7 @@ categories: - retro tags: - games + - dos - engines --- diff --git a/content/post/2024/06/visualizing-blog-post-links-with-obsidian.md b/content/post/2024/06/visualizing-blog-post-links-with-obsidian.md index a00c4f85..6cc742e3 100644 --- a/content/post/2024/06/visualizing-blog-post-links-with-obsidian.md +++ b/content/post/2024/06/visualizing-blog-post-links-with-obsidian.md @@ -1,22 +1,64 @@ --- title: Visualizing Blog Post Links With Obsidian -date: 2024-06-11T09:00:00+02:00 -draft: true +date: 2024-06-10T13:40:00+02:00 tags: - obsidian + - backlinks + - hugo categories: - - braindump + - software --- -TODO +Brain Baking has been powered by the static site generator Hugo for a good decade now. Everything I've written and published here has come to fruition with the help of Sublime Text and Hugo. Yet in 2021 I started using another Markdown-powered editor called Obsidian to edit my digital notes before they make it to this blog. The inevitable question then becomes: why not write articles directly into your Obsidian Vault and publish from there? -Links in form of `[description](/post/year/month/file-name/)` should become `[[file-name]]`. +There are ample articles from others exploring that thought but they all start in reverse: they build a Vault with notes in Obsidian and want to see it published with Hugo. Brain Baking already contains 427 articles and I am not looking forward to converting these to an Obsidian-compatible syntax, only to be using another tool to convert it back to HMTL. But wait, why wouldn't Hugo files living in `/content` be compatible? -Regex `\[(.*)\]\(/post/[0-9]+/[0-9]+/(.+)/\)` replace with `[[$2]]` +Because of one big stinker: links. Default Markdown-style links I use to link this article with others in the form of `[blah](/post/yyyy/mm/other-article/)` include a lot of problematic substrings for Obsidian: + +- The leading slash `/post` points to the root. This [isn't compatible with sub-vault inclusion](https://forum.obsidian.md/t/start-absolute-path-with-a-leading-slash/32501) systems in Obsidian, so root slashes aren't supported. +- The path itself starts at `post` but lives in `content` in the root of my Brain Baking repository. At what level are you creating an Obsidian Vault then? +- The trailing slash `other-article/` confuses Obsidian into thinking it's a different file. The graph view points to a non-existing file. + +Even though you were to disable `[[wikilinks]]` in Obsidian, you'll have to apply a bunch of fancy regexes before Obsidian is able to process and link the documents correctly. I came up with a quick and dirty regex `\[(.*)\]\(/post/[0-9]+/[0-9]+/(.+)/\)` to replace Markdown-links with `[[$2]]`, getting rid of the path entirely. I've seen others like [this hugo-wikilinks repository](https://github.com/milafrerichs/hugo-wikilinks) and [Quinn Casey](https://quinncasey.com/hugo-wikilink-support/) relying on the same dumb trick. Of course, that breaks the Hugo rendering pipeline, resulting in `` HTML tags that point to nowhere. + +An even bigger problem I won't go into is the way I organize my `static` files: images are included using `![](../image.jpg "description")` because I do not want to create a directory for each post: they live in `/static/post/yyyy/mm`---but get copied over by Hugo, so the static folder doesn't really exist. Confused yet? + +In sum, it is not possible to simply import a Hugo content or post directory into an Obsidian Vault and call it a day. The most compelling reason to write directly in Obsidian isn't the better Markdown support but (1) the graph view with (implicit) backlink support and (2) the fuzzy search and auto-include while typing `[[` to link to an existing article. I guess I'll have to try and find similar plug-ins for Sublime Text for that. Another option would be to write a tool that converts from A to B so that Hugo can convert to C. but that sounds like an unhealthy case of over-engineering to me. + +Still, using the above dirty regex, I was able to extract a partial graph view of connected blog posts: ![](../site-as-obs-graph.jpg "A link graph of blog posts at Brain Baking rendered with Obsidian.") -- spider form: monthly overview posts linking to previous -- nut? -- separate indexes in `/archives` replacing the "by year" list +This does not include tags or categories which should appear as heavily linked nodes in the graph. In Obsidian, concepts and tables of contents are usually Markdown files as well, making these links explicit. +I found the above graph very interesting, especially its spider-like form thanks to my more recent habit of writing monthly overview posts that are form a heavily linked web. The edge links pointing up and down are mostly these kinds of posts. + +What stood out the most, however, was that almost all posts are written **within context**: they're always linked to at least one other relevant post. I love providing the reader (and thus, mostly myself) options to discover similar articles, hence the _You Might Also Like..._ footer beyond every post, listing five related posts using tag intersections and [true backlinks](/post/2022/04/true-backlink-support-in-hugo). + +Even though that messy graph is meaningless on its own, I wondered if introducing an explicit layer would be a good idea to easier find stuff. In Hugo terms, that means adding another taxonomy next to the global _category_ and micro _tag_ levels. What if I could separate indexes in `/archives` into clusters called _series_---clusters I would identify using Obsidian's graph? + +After a few evenings of messing around, I came up with a couple of series belonging to a specific category: + +``` +webdesign + - blogging about blogging + - hugo static site generation +software + - self-hosted adventures +retro + - physical game collecting + - game boy hacking + - retro pc hardware +education + - creativity in software engineering + - computing education +... +``` + +Articles belonging to a series could simply be added to the chain by a `series:` key in the front matter. But. Once I got all that working, the overview bugged me: the differences between categories, series, and tags began fading away. For instance, I had a Hugo series, but I also had a Hugo tag. Delete the tag? Broaden the series? More than half of the series seemed to perfectly map to an existing tag. By introducing the taxonomy _series_, I made things worse, not better. + +After a painful `git reset`, I came up with a good-enough alternative: clean up some of the tags and display a curated selection related to each category [in the Archives section](/archives) to highlight the central themes on Brain Baking. I also added a list of tags in the RSS layout in case feed reader folks might want to start spelunking. + +The whole linking system isn't as complex as [how I display series of posts](/post/2024/01/displaying-series-of-posts-in-hugo/) on my gaming blog that's also powered by Hugo---where admittedly the whole "series" system was introduced because tags started getting messy. Game platforms replace categories there which makes more sense. That blog is also much more focused while on Brain Baking I like to write about anything that comes to mind. + +Obsidian visualized that I like linking articles together, even though while browsing the archives that perhaps doesn't come across as obvious. I'm still not too convinced. If you have a better idea about handling the big ball of mud called taxonomies, please drop me a line. diff --git a/content/tags/_index.md b/content/tags/_index.md index f23ac50b..08c1701a 100644 --- a/content/tags/_index.md +++ b/content/tags/_index.md @@ -6,7 +6,7 @@ aliases: icontag: tag --- -The preservation of [once freshly baked](/post) but now perhaps stale thoughts.
Not finding what you're looking for? Try browsing the archives: +The preservation of [once freshly baked](/post) but now perhaps stale thoughts.
Not finding what you're looking for? Try searching for a specific term: ## By Search @@ -54,11 +54,10 @@ Each article belongs to one or more of the following _categories_. Similar posts
Retro - am486 + pc hardware dos gameboy collecting - expansion card
  • diff --git a/themes/brainbaking-minimal/layouts/_default/rss.xml b/themes/brainbaking-minimal/layouts/_default/rss.xml index ba2040a3..3e963eac 100644 --- a/themes/brainbaking-minimal/layouts/_default/rss.xml +++ b/themes/brainbaking-minimal/layouts/_default/rss.xml @@ -59,14 +59,17 @@ {{ $content = replaceRE `a href="/(.*?)"` (printf "%s%s%s" "a href=\"" $baseurl "$1\"") $content }} {{ ` - -

    - {{ end }} - {{ $content | safeHTML }} + {{ if isset .Params "tags" }} +

    + Related topics: / + {{- range .Params.tags }} + {{ . }} / + {{- end -}} + +

    + {{ end }}

    By {{ .Site.Author.name }} on {{ .Date.Format "2 January 2006" }}.  Reply via email.