@stacksjs/stx 0.2.38 → 0.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,8 +33,17 @@ export declare function translate(i18n: ResolvedI18n, locale: string, key: strin
33
33
  export declare function applyTranslations(html: string, i18n: ResolvedI18n, locale: string): string;
34
34
  /**
35
35
  * URL path for a built page in the given locale.
36
- * `/` stays `/` for the default locale; otherwise it's `/<code>/`.
37
- * `/about` becomes `/<code>/about` for non-default locales.
36
+ *
37
+ * - `/` stays `/` for the default locale; for non-default locales it
38
+ * becomes `/<code>/` (with the trailing slash). The slash matters
39
+ * because most static hosts (S3+CloudFront, GitHub Pages, etc.)
40
+ * only serve the directory's `index.html` when the URL ends in `/`
41
+ * — `/de` 404s, `/de/` resolves. Linking with the slash avoids a
42
+ * client-side redirect dance and lets SPA hops succeed without
43
+ * falling back to a full page load.
44
+ * - `/about` becomes `/<code>/about` for non-default locales (no
45
+ * trailing slash — those map to `<code>/about.html`).
46
+ * - `/404.html` keeps its filename and lives under the locale prefix.
38
47
  */
39
48
  export declare function localizePath(path: string, locale: string, defaultLocale: string): string;
40
49
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.38",
4
+ "version": "0.2.39",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",