@stacksjs/stx 0.2.38 → 0.2.40
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.
- package/dist/cli.js +228 -228
- package/dist/index.js +204 -204
- package/dist/site-builder/i18n.d.ts +11 -2
- package/package.json +1 -1
|
@@ -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
|
-
*
|
|
37
|
-
*
|
|
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
|
/**
|