1
0

Fix SPA routing for GitHub Pages deployment

- Update 404.html with React content instead of Vue
- Add automatic 404.html copy to build script
- Fix URL typo in og:url meta tag
- Ensure client-side routing works for user pages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-18 15:26:05 +09:00
parent 510899a0dd
commit 2cd1a62e5d
3 changed files with 22 additions and 12 deletions

View File

@@ -19,7 +19,8 @@
"Bash(find:*)",
"Bash(rm:*)",
"Bash(grep:*)",
"Bash(ls:*)"
"Bash(ls:*)",
"Bash(cp:*)"
],
"deny": []
}

View File

@@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "tsc && vite build && cp dist/index.html dist/404.html",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
},

View File

@@ -1,12 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>card.syui.ai</title><link href="app.css" rel="preload" as="style"><link href="app.js" rel="preload" as="script"><link href="chunk-vendors.js" rel="preload" as="script"><link href="app.css" rel="stylesheet">
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/ai.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>card.syui.ai</title>
<link rel="stylesheet" href="/pkg/icomoon/style.css" />
<link rel="stylesheet" href="/pkg/font-awesome/css/all.min.css" />
<script type="module" crossorigin src="/index.js"></script>
<link rel="stylesheet" crossorigin href="/index.css">
<meta name="twitter:card" content="summary">
<meta property="og:url" content="https://card.syui.aiL">
<meta property="og:url" content="https://card.syui.ai">
<meta property="og:title" content="card.syui.ai">
<meta property="og:description" content="@yui.bsky.social /card">
<meta property="og:image" content="https://card.syui.ai/card/card_0.png">
</head>
<body><div id="app"></div><script src="chunk-vendors.js"></script><script src="app.js"></script></body>
<body>
<div id="root"></div>
</body>
</html>