@prezly/theme-kit-nextjs 6.4.6-alpha.2 → 6.6.0
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/README.md +4 -0
- package/build/intl/locale.js +1 -1
- package/build/intl/locale.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -73,6 +73,10 @@ module.exports = withPrezlyConfig(config);
|
|
|
73
73
|
|
|
74
74
|
You can also add the properties manually if you want even more control over the config.
|
|
75
75
|
|
|
76
|
+
#### Usage with `basePath` setting
|
|
77
|
+
|
|
78
|
+
When using `basePath` setting in your next.config.js, wrapping your config with `withPrezlyConfig` will automatically populate `NEXT_PUBLIC_BASE_PATH` env variable, which will be respected by Theme Kit helpers and hooks (like `useInfiniteStoriesLoading`). We also export `getResolvedPath` helper that can be used to resolve paths with respect to your `basePath` setting.
|
|
79
|
+
|
|
76
80
|
#### Using next/image to display images served from Prezly
|
|
77
81
|
|
|
78
82
|
We provide `@prezly/uploadcare-image` package to conveniently display images inside Prezly content, and this is the recommended way to display images in your theme.
|
package/build/intl/locale.js
CHANGED
|
@@ -15,7 +15,7 @@ function getRedirectToCanonicalLocale(shortestLocaleCode, nextLocaleIsoCode, red
|
|
|
15
15
|
? theme_kit_core_1.LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug()
|
|
16
16
|
: shortestLocaleCode;
|
|
17
17
|
if (shortestLocaleSlug !== nextLocaleIsoCode) {
|
|
18
|
-
const prefixedPath = redirectPath.startsWith('/') ? redirectPath :
|
|
18
|
+
const prefixedPath = redirectPath && !redirectPath.startsWith('/') ? `/${redirectPath}` : redirectPath;
|
|
19
19
|
const finalPath = shortestLocaleSlug
|
|
20
20
|
? `/${shortestLocaleSlug}${prefixedPath}`
|
|
21
21
|
: prefixedPath;
|
package/build/intl/locale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/intl/locale.ts"],"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AChC,CAAC,CAAC,IAAI,kBAAkB,GAAG,YAAY,EAAE;YACzC,CAAC,CAAC,YAAY,CAAC;QAEnB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,IAAA,uBAAS,EAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErD,OAAO;YACH,WAAW,EAAE,GAAG,IAAA,uBAAe,EAAC,SAAS,CAAC,GAAG,QAAQ,EAAE;YACvD,SAAS,EAAE,KAAK;SACnB,CAAC;KACL;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AA/BD,oEA+BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with NextJS",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@prezly/theme-kit-core": "^6.
|
|
74
|
+
"@prezly/theme-kit-core": "^6.6.0",
|
|
75
75
|
"next-seo": "^5.4.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@sentry/nextjs": "7.
|
|
78
|
+
"@sentry/nextjs": "7.74.0"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
83
|
"sideEffects": false,
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "3052b81b07bd65b57c2abfec7f07ee9346df4676"
|
|
85
85
|
}
|