@lexibase/rdx-next 5.1.0 → 5.1.2
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/bin/locale-routes.mjs +4 -1
- package/dist/runtime/index.js +11 -4
- package/package.json +2 -2
package/bin/locale-routes.mjs
CHANGED
|
@@ -127,7 +127,10 @@ async function selected(locale: string) {
|
|
|
127
127
|
if (!project.localization!.locales.some(entry => entry.path === locale)) notFound()
|
|
128
128
|
return getLocalizedProject(project, locale)
|
|
129
129
|
}
|
|
130
|
-
export async function generateStaticParams({ params }: { params: { locale: string } }) {
|
|
130
|
+
export async function generateStaticParams({ params }: { params: { locale: string } }) {
|
|
131
|
+
const paths = getProjectDocsPaths(await selected(params.locale))
|
|
132
|
+
return [{ slug: [] }, ...paths.map(slug => ({ slug: slug.split('/') }))]
|
|
133
|
+
}
|
|
131
134
|
export async function generateMetadata({ params }: { params: Promise<Params> }) { const { locale, slug } = await params; return getDocumentMetadata({ project: await selected(locale), slug }) }
|
|
132
135
|
export default async function Page({ params }: { params: Promise<Params> }) { const { locale, slug } = await params; return <DocsPage project={await selected(locale)} slug={slug} /> }
|
|
133
136
|
`
|
package/dist/runtime/index.js
CHANGED
|
@@ -662,10 +662,17 @@ async function DocsPage({
|
|
|
662
662
|
Button,
|
|
663
663
|
{
|
|
664
664
|
variant: "link",
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
665
|
+
nativeButton: false,
|
|
666
|
+
render: /* @__PURE__ */ jsx(
|
|
667
|
+
"a",
|
|
668
|
+
{
|
|
669
|
+
href: getDocsHref4(
|
|
670
|
+
originalProject,
|
|
671
|
+
contentSource,
|
|
672
|
+
currentSlug
|
|
673
|
+
),
|
|
674
|
+
hrefLang: contentLanguage
|
|
675
|
+
}
|
|
669
676
|
),
|
|
670
677
|
children: messages.viewOriginal
|
|
671
678
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexibase/rdx-next",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"description": "The Next.js runtime for RDX documentation projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"next": "^16.4.2",
|
|
82
82
|
"react": "19.3.1",
|
|
83
83
|
"react-dom": "19.3.1",
|
|
84
|
+
"@lexibase/rdx-ui": "3.5.3",
|
|
84
85
|
"@rdx/typescript-config": "1.0.0",
|
|
85
|
-
"@lexibase/rdx-ui": "3.5.2",
|
|
86
86
|
"@rdx/eslint-config": "1.0.0"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|