Open bowencool opened 6 months ago
Describe the bug
Since src/pages/[lang]/404.astro will never be displayed, I have written custom logic in src/pages/404.astro.
src/pages/[lang]/404.astro
src/pages/404.astro
const pathname = Astro.url.pathname; if (pathname.startsWith("/zh/")) { changeLanguage("zh"); } else { changeLanguage("en"); }
However, running npx astro-i18next generate will break this logic.
npx astro-i18next generate
Expected behavior
Ignore 404.astro file
Screenshots
Context (please complete the following information):
By the way, please add support for .ts and .tsx files to the generate command.
.ts
.tsx
generate
Describe the bug
Since
src/pages/[lang]/404.astro
will never be displayed, I have written custom logic insrc/pages/404.astro
.However, running
npx astro-i18next generate
will break this logic.Expected behavior
Ignore 404.astro file
Screenshots
Context (please complete the following information):