feat(website): drop hash-based router

This commit is contained in:
Simon
2026-02-27 19:46:44 +08:00
parent 5f74f98a97
commit 68d68182e2
28 changed files with 349 additions and 136 deletions

View File

@@ -46,6 +46,15 @@
</head>
<body>
<div id="root"></div>
<script>
// Restore SPA path from 404.html redirect (GitHub Pages)
;(function () {
var p = new URLSearchParams(window.location.search).get('p')
if (p) {
window.history.replaceState(null, '', window.location.pathname + p + window.location.hash)
}
})()
</script>
<script type="module" src="./src/main.tsx"></script>
<script>
// Dynamically update html lang attribute based on i18n detection