workaround to redirect trailing slashes
This commit is contained in:
parent
cacfb0f329
commit
3f16d2fe1d
|
|
@ -1,30 +0,0 @@
|
||||||
# .github/workflows/publish.yml
|
|
||||||
name: Generate build on branch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Build and Push
|
|
||||||
steps:
|
|
||||||
- name: git-checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install all dependencies
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Push
|
|
||||||
uses: s0/git-publish-subdir-action@develop
|
|
||||||
env:
|
|
||||||
REPO: self
|
|
||||||
BRANCH: build # The branch name where you want to push the assets
|
|
||||||
FOLDER: dist # The directory where your assets are generated
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
|
|
||||||
MESSAGE: "Build: ({sha}) {msg}" # The commit message
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
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"
|
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">
|
rel="stylesheet">
|
||||||
<title>Orion Reed</title>
|
<title>Orion Reed</title>
|
||||||
|
<script>
|
||||||
|
if (window.location.pathname.slice(-1) === '/' && window.location.pathname.length > 1) {
|
||||||
|
window.location = window.location.toString().replace(/\/$/, '');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"prebuild": "node scripts/prebuild.mjs",
|
"prebuild": "node scripts/prebuild.mjs",
|
||||||
"build": "node scripts/prebuild.mjs && vite build",
|
"build": "node scripts/prebuild.mjs && vite build && cp dist/index.html dist/404.html",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export function Header({ dark }: { dark?: boolean }) {
|
||||||
<Container size="40em">
|
<Container size="40em">
|
||||||
<Group align="end">
|
<Group align="end">
|
||||||
<Anchor href="/" className={classes.home}>
|
<Anchor href="/" className={classes.home}>
|
||||||
orion reed
|
orion reed 0
|
||||||
</Anchor>
|
</Anchor>
|
||||||
<Anchor href="/posts" className={classes.link}>
|
<Anchor href="/posts" className={classes.link}>
|
||||||
posts
|
posts
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue