From 872caa51cd72abf37929ca2da496e76aa195255d Mon Sep 17 00:00:00 2001 From: dvho Date: Sat, 27 Jul 2024 09:15:09 -0400 Subject: [PATCH] Updates --- 404.html | 10 +++++++++- CNAME | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 CNAME diff --git a/404.html b/404.html index 737232c..3d13931 100644 --- a/404.html +++ b/404.html @@ -13,12 +13,20 @@ document.open(); document.write(xhr.responseText); document.close(); + fixRelativePaths(); } }; xhr.send(); } - //Preserve the original path, query string, and hash + // Function to fix relative paths for assets + function fixRelativePaths() { + var base = document.createElement('base'); + base.href = '/'; + document.head.appendChild(base); + } + + // Preserve the original path, query string, and hash var path = window.location.pathname; var query = window.location.search; var hash = window.location.hash; diff --git a/CNAME b/CNAME deleted file mode 100644 index 40cb7f3..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -davidhomyk.com \ No newline at end of file