fix(blog): resolve relative URLs in Markdown images and links with a fixed base (#4287)

These changes add a layered hook to the `markdown-it` renderer rules to
resolve `<img>` element `src` attributes and `<a>` element `href`
attributes to a path-absolute relative URL, to ensure that such URLs
always point to the same resource URL even when the URL the current
resource is being viewed from changes.

This fixes an issue with relative links and image source URLs being
broken when a blog post was watched from a URL that lacked a trailing
slash, as web browsers adjust the path relative URLs are resolved from
depending on whether such character is present, and we didn't account
for that.

While at it, I've rebuilt all the blog posts and their associated RSS
feed.
This commit is contained in:
Alejandro González
2025-08-29 15:44:03 +02:00
committed by GitHub
parent 7afe35a6cd
commit 8b98087936
25 changed files with 80 additions and 51 deletions

File diff suppressed because one or more lines are too long