fix(blog): use root-relative paths for mascot images - #218
Merged
Conversation
Parent-relative paths (../../assets/blog/...) only resolved correctly on the post's own page. The blog plugin re-renders the full post body on the category and archive listing pages, which sit one directory level deeper, so the same relative path pointed at the wrong location and 404'd there. Root-relative paths resolve correctly regardless of what page depth the content is embedded at.
wesleyscholl
marked this pull request as ready for review
July 7, 2026 01:39
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes broken mascot images on
/blog/category/benchmarks/and/blog/archive/2026/, reported by the user after checking those pages.Root cause: the blog post's mascot images (hero, fistpump, flying, building) use raw
<img>tags (not standard Markdown image syntax), with hardcoded parent-relativesrc="../../assets/blog/..."paths. MkDocs only rewrites relative paths inside standard Markdown links/images when it re-renders content elsewhere; hand-written raw HTML paths are left as literal text. Since this post has no excerpt separator, the blog plugin embeds the entire article body on the category and archive listing pages — which sit one directory level deeper than the post's own URL — so the same../../prefix that correctly resolves to site root from/blog/local-llm-fast-enough/instead resolves to/blog/from those listing pages, 404ing all 4 images there.Fix: switched all 4 image
srcattributes to root-relative paths (/assets/blog/squish-*.png), which resolve correctly regardless of the depth of the page embedding the content.(Also investigated the "table text isn't purple" report from the same message — verified via a fresh headless-browser render of the current build that
table td/table thcompute torgb(168, 85, 247)i.e.#a855f7as intended, and the deployedextra.csson squish.run already contains the correct rule. That looks like a client-side cache issue rather than a deploy bug; no code change needed there.)Type of change
Checklist
/assets/...paths, not machine-local absolute paths)pytest tests/passes locally — N/A, docs-only changeruff check squish/ tests/reports no errors — N/A, no Python changedsquish benchrun — N/AVerified locally with
mkdocs build: all 4 mascot images now resolve to the same root-relative path on the post page, the category listing page, and the archive listing page.Related issues
Follow-up to #215, #216, #217.
Generated by Claude Code