From 2cd1a62e5d7af176cffcb1f8cd5afb60361da31f Mon Sep 17 00:00:00 2001 From: syui Date: Fri, 18 Jul 2025 15:26:05 +0900 Subject: [PATCH] Fix SPA routing for GitHub Pages deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .claude/settings.local.json | 3 ++- package.json | 2 +- public/404.html | 29 +++++++++++++++++++---------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 6eff636..3ea6d6c 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -19,7 +19,8 @@ "Bash(find:*)", "Bash(rm:*)", "Bash(grep:*)", - "Bash(ls:*)" + "Bash(ls:*)", + "Bash(cp:*)" ], "deny": [] } diff --git a/package.json b/package.json index aa85083..cc6e98b 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/public/404.html b/public/404.html index e1e818a..5f452af 100644 --- a/public/404.html +++ b/public/404.html @@ -1,12 +1,21 @@ - - - card.syui.ai - - - - - - -
+ + + + + + card.syui.ai + + + + + + + + + + + +
+