fix(docs): correct Hasselhoff spelling, add locale-aware 404 redirect

Fix "Hasslehoff" → "Hasselhoff" typo in customize-bmad.md across all
three locales (en, zh-cn, fr).

Add client-side locale detection to 404.astro so GitHub Pages serves
the correct localized 404 page instead of always showing English.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Verkhovsky 2026-03-21 16:09:39 -06:00
parent 10282a4a14
commit ea52ff7da5
4 changed files with 19 additions and 3 deletions

View File

@ -84,7 +84,7 @@ Ajouter un contexte persistant que l'agent gardera toujours en mémoire :
```yaml ```yaml
memories: memories:
- 'Travaille au Krusty Krab' - 'Travaille au Krusty Krab'
- 'Célébrité préférée : David Hasslehoff' - 'Célébrité préférée : David Hasselhoff'
- 'Appris dans lEpic 1 que ce nest pas cool de faire semblant que les tests ont passé' - 'Appris dans lEpic 1 que ce nest pas cool de faire semblant que les tests ont passé'
``` ```

View File

@ -85,7 +85,7 @@ Add persistent context the agent will always remember:
```yaml ```yaml
memories: memories:
- 'Works at Krusty Krab' - 'Works at Krusty Krab'
- 'Favorite Celebrity: David Hasslehoff' - 'Favorite Celebrity: David Hasselhoff'
- 'Learned in Epic 1 that it is not cool to just pretend that tests have passed' - 'Learned in Epic 1 that it is not cool to just pretend that tests have passed'
``` ```

View File

@ -85,7 +85,7 @@ persona:
```yaml ```yaml
memories: memories:
- 'Works at Krusty Krab' - 'Works at Krusty Krab'
- 'Favorite Celebrity: David Hasslehoff' - 'Favorite Celebrity: David Hasselhoff'
- 'Learned in Epic 1 that it is not cool to just pretend that tests have passed' - 'Learned in Epic 1 that it is not cool to just pretend that tests have passed'
``` ```

View File

@ -9,3 +9,19 @@ const { Content } = await entry.render();
<StarlightPage frontmatter={{ title: entry.data.title, template: entry.data.template }}> <StarlightPage frontmatter={{ title: entry.data.title, template: entry.data.template }}>
<Content /> <Content />
</StarlightPage> </StarlightPage>
<!-- GitHub Pages serves this single 404.html for all paths.
Redirect to the locale-specific 404 page when the URL has a locale prefix. -->
<script is:inline>
(function () {
var locales = ['zh-cn', 'fr'];
var path = window.location.pathname;
for (var i = 0; i < locales.length; i++) {
var prefix = '/' + locales[i] + '/';
if (path.startsWith(prefix) && path !== prefix + '404/') {
window.location.replace(prefix + '404/');
return;
}
}
})();
</script>