Fixing shortlink redirection

This commit is contained in:
Kent Joseph T. Palima
2026-05-04 11:54:57 +08:00
parent d33be6dbde
commit fef02af898
+13
View File
@@ -59,6 +59,19 @@ const {
<link rel="manifest" href="site.webmanifest" />
<link rel="sitemap" href="/sitemap-index.xml" />
<ClientRouter />
<script is:inline>
// Runs immediately on every hard page load
const url = new URL(window.location.href);
if (url.searchParams.has('noloop')) {
url.searchParams.delete('noloop');
// Replace the URL in the address bar without adding to history
const cleanUrl = url.pathname + url.search + url.hash;
window.history.replaceState({}, '', cleanUrl);
}
</script>
</head>
<body>
<Header client:load />