hugo: tag-based post connections Perrotta's blog now displays tag-based post connections, adding a second edge type that links up to two posts sharing the most tags, excluding direct links, with shared-tag edges rendered as dashed and muted lines. The pre-computation function and CSS styles were updated, and tests pass, enhancing the blog's graph visualization. ♠ Previously https://perrotta.dev/2026/08/llm-devise-a-plan/ . Problem statement : post connections showed only direct links, while posts with the same tags remained disconnected in the graph of this blog. I added a second kind of edge. The pre-computation picks up to two posts with the most shared tags , breaks ties by date, and excludes direct links: python def compute tag related posts post: dict, all posts: list dict , outlinks set: set str , backlinks set: set str , limit: int = 2, - list str : """Compute tag connections, excluding posts with direct links.""" post tags = set post "tags" if not post tags: return direct ids = outlinks set | backlinks set scored = for other in all posts: other id = other "id" if other id == post "id" or other id in direct ids: continue shared tags = post tags & set other "tags" if shared tags: scored.append other id, len shared tags , other "date" scored.sort key=lambda item: item 1 , item 2 , item 0 , reverse=True return item 0 for item in scored :limit Direct links remain directional, solid, and prominent. Shared-tag links are symmetric, dashed, and muted: .mini-graph .mini-graph-direct-edge { fill: none; stroke: var --link-color ; stroke-width: 2.25; stroke-opacity: 0.9; } .mini-graph .mini-graph-tag-edge { fill: none; stroke: var --color-gray ; stroke-width: 1; stroke-dasharray: 4 4; stroke-opacity: 0.65; } The original Anki post https://perrotta.dev/2026/07/anki-archive-a-deck/ now gets one direct link and two tag connections: { "outlinks": "2024-12-23-anki-workflow" , "tag related": "2026-04-15-anki-flashcards-with-claude-code", "2026-04-13-anki-api-access" } % python3 ci/test precompute links.py .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK There’s a limit of 2 shared tag post edges for the sake of not visually polluting the presentation. I’ve been loving how this little blog is evolving into my beloved public digital garden. 🤖 Drafted with ∎ /bloggify .— § — Reply via email mailto:serendipity@perrotta.dev?subject=Reply to: hugo: tag-based post connections