fix(site): link to the game with target=_self to avoid VitePress SPA 404
Build · Site / build (push) Successful in 8s
Tests · Integration / integration (pull_request) Successful in 1m38s
Build · Site / build (pull_request) Successful in 10s
Tests · Go / test (pull_request) Failing after 3m0s
Tests · UI / test (pull_request) Successful in 2m35s

VitePress is a Vue SPA; a same-origin link to /game/ (a separate app, not
a VitePress page) was intercepted by its client router and rendered
VitePress's own 404 until a manual reload. Mark the game links (both
home pages and the nav item) target="_self" so the click is a real
browser navigation that the edge Caddy serves from the game bundle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-23 19:13:15 +02:00
parent 9cb5097f54
commit ec98639d49
3 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -28,7 +28,11 @@ export default defineConfig({
label: "English", label: "English",
lang: "en", lang: "en",
themeConfig: { themeConfig: {
nav: [{ text: "Play", link: "/game/" }], // The game is a separate app under /game/, not a VitePress page.
// target "_self" makes the link a real navigation (full load),
// not a client-side SPA route — otherwise VitePress shows its
// own 404 for the unknown route.
nav: [{ text: "Play", link: "/game/", target: "_self" }],
sidebar: [ sidebar: [
{ {
text: "Galaxy", text: "Galaxy",
@@ -42,7 +46,7 @@ export default defineConfig({
lang: "ru", lang: "ru",
link: "/ru/", link: "/ru/",
themeConfig: { themeConfig: {
nav: [{ text: "Играть", link: "/game/" }], nav: [{ text: "Играть", link: "/game/", target: "_self" }],
sidebar: [ sidebar: [
{ {
text: "Galaxy", text: "Galaxy",
+1 -1
View File
@@ -2,4 +2,4 @@
A turn-based space strategy game. A turn-based space strategy game.
[Play the game →](/game/) [Play the game →](/game/){target="_self"}
+1 -1
View File
@@ -2,4 +2,4 @@
Пошаговая космическая стратегия. Пошаговая космическая стратегия.
[Играть →](/game/) [Играть →](/game/){target="_self"}