From edfa3b44aa984d8505162f29dbe43d7b8bdd3813 Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Sat, 14 Mar 2026 20:56:50 -0500 Subject: [PATCH] Fix 404 page broken CSS, JS, and images on deep URLs Add tag to 404.html so relative URLs resolve correctly. Without it, when a user hits a deep non-existent path like /blog/2025/12/10/nonexistent/, the browser resolves all relative CSS, JS, and image URLs against that path, breaking the page layout. Also change the home button from relURL to absURL for consistency. Co-Authored-By: Claude Opus 4.6 --- layouts/404.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/404.html b/layouts/404.html index 9e01ae1fe..e0afc6e2d 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,6 +2,7 @@ + {{ partial "headers.html" . }} {{ partial "custom_headers.html" . }} @@ -24,7 +25,7 @@

{{ i18n "404Message" | markdownify }}

{{ i18n "404Error" | markdownify }}

-

{{ i18n "404NavHome" | markdownify }} +

{{ i18n "404NavHome" | markdownify }}