trying to fix gh-pages routing
This commit is contained in:
parent
3f16d2fe1d
commit
834a2dd72b
|
|
@ -10,11 +10,7 @@
|
|||
href="https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,300;0,400;0,500;0,700;0,800;0,900;1,300;1,400;1,500;1,700;1,800;1,900&family=Alegreya:ital,wght@0,400..900;1,400..900&family=IBM+Plex+Mono:ital,wght@0,200;0,300;0,400;0,500;0,600;1,200;1,300;1,400;1,500;1,600&display=swap"
|
||||
rel="stylesheet">
|
||||
<title>Orion Reed</title>
|
||||
<script>
|
||||
if (window.location.pathname.slice(-1) === '/' && window.location.pathname.length > 1) {
|
||||
window.location = window.location.toString().replace(/\/$/, '');
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"scripts": {
|
||||
"dev": "vite",
|
||||
"prebuild": "node scripts/prebuild.mjs",
|
||||
"build": "node scripts/prebuild.mjs && vite build && cp dist/index.html dist/404.html",
|
||||
"build": "node scripts/prebuild.mjs && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,11 @@ export function App() {
|
|||
<Router>
|
||||
<Route path="/" component={Home} />
|
||||
<Route path="/posts" component={Posts} />
|
||||
<Route path="/posts/" component={Posts} />
|
||||
<Route path="/posts/:title" component={Post} />
|
||||
<Route path="/posts/:title/" component={Post} />
|
||||
<Route path="/stream" component={Stream} />
|
||||
<Route path="/stream/" component={Stream} />
|
||||
<Route default component={NotFound} />
|
||||
</Router>
|
||||
</LocationProvider>
|
||||
|
|
|
|||
Loading…
Reference in New Issue