diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..b087f2f --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,128 @@ +--- +import Layout from '../layouts/Layout.astro'; + +// 1. Capture the exact path the user tried to visit (e.g., "/hihi") +const currentPath = Astro.url.pathname; + +// 2. Build the correct shortlink URL without the "www." +const shortlinkUrl = `https://upiecep.org${currentPath}`; +--- + + + + 404 + Oops! We couldn't find that page. + + The link you clicked might be broken, or the page may have been removed. + + + Looking for a shortlink? If you typed "www" before the link, it might have broken it. Try the direct shortlink below! + + + + + Go to Homepage + + + + Try {shortlinkUrl} + + + + + +
+ The link you clicked might be broken, or the page may have been removed. +
+ Looking for a shortlink? If you typed "www" before the link, it might have broken it. Try the direct shortlink below! +