From b98215a2bfd79cb770d81fbd234e0001fc03f190 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:01:54 +0200 Subject: [PATCH] fix: fall back to URL as link text in See Also when post has no title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Titleless posts (notes, reposts) produced an empty in See Also. The condition `_relPost.data.title if _relPost else relUrl` only fell back to the URL when postByUrl returned null — not when the post was found but carried no title field. Co-Authored-By: Claude Sonnet 4.6 --- _includes/layouts/post.njk | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 6d584d6..2a66012 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -130,7 +130,10 @@ withBlogSidebar: true {# See Also — explicit related: frontmatter + in-text links to other blog posts #} {% set _seeAlso = page.inputPath | seeAlsoLinks(related) %} - {% if _seeAlso.length > 0 %} + {# Cross-link posts that share the same external target URL (repostOf, likeOf, etc.) #} + {% set _targetUrl = repostedUrl or likedUrl or bookmarkedUrl or replyTo %} + {% set _sameTarget = collections.posts | sameTargetPosts(_targetUrl, page.url) %} + {% if _seeAlso.length > 0 or _sameTarget.length > 0 %}

See Also