From e4390db99e6f91e7d001e97ad4a9f4e6650b23e0 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:25:41 +0200 Subject: [PATCH] fix: exclude image links from See Also; show path-only for untitled URL fallbacks Co-Authored-By: Claude Sonnet 4.6 --- _includes/layouts/post.njk | 6 +++--- eleventy.config.js | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 1806f0e..9a259c0 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -141,14 +141,14 @@ withBlogSidebar: true {% set _relPost = collections.posts | postByUrl(relUrl) %}
  • - {{ (_relPost.data.title if _relPost else null) or relUrl }} + {{ (_relPost.data.title if _relPost else null) or (relUrl | pathOnly) }}
  • {% endfor %} {% for stp in _sameTarget %}
  • - {{ stp.data.title or stp.url }} + {{ stp.data.title or (stp.url | pathOnly) }}
  • {% endfor %} @@ -165,7 +165,7 @@ withBlogSidebar: true {% for post in _backlinks %}
  • - {{ post.data.title or post.url }} + {{ post.data.title or (post.url | pathOnly) }}
  • {% endfor %} diff --git a/eleventy.config.js b/eleventy.config.js index dc8545c..3c20114 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1357,13 +1357,19 @@ export default function (eleventyConfig) { try { const content = readFileSync(inputPath, "utf-8"); const escaped = siteUrl.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - const re = new RegExp(`\\]\\((${escaped}/[^)\\s]+)\\)`, "g"); + const re = new RegExp(`(?