@lexibase/rdx-next 5.0.1 → 5.1.1
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 +8 -3
- package/package.json +5 -5
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
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
rehypeDocumentationHeadings,
|
|
45
45
|
rehypeDocumentationCode
|
|
46
46
|
} from "@lexibase/rdx-core/mdx";
|
|
47
|
-
function compileDocumentation(source, components, links) {
|
|
47
|
+
function compileDocumentation(source, components, links, grammars, themes) {
|
|
48
48
|
return compileMDX({
|
|
49
49
|
source,
|
|
50
50
|
components,
|
|
@@ -58,7 +58,10 @@ function compileDocumentation(source, components, links) {
|
|
|
58
58
|
remarkDocumentationComponents,
|
|
59
59
|
[remarkDocumentLinks, links]
|
|
60
60
|
],
|
|
61
|
-
rehypePlugins: [
|
|
61
|
+
rehypePlugins: [
|
|
62
|
+
rehypeDocumentationHeadings,
|
|
63
|
+
[rehypeDocumentationCode, grammars, themes]
|
|
64
|
+
]
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
});
|
|
@@ -584,7 +587,9 @@ async function DocsPage({
|
|
|
584
587
|
basePath: contentSource.basePath,
|
|
585
588
|
virtualPaths: !!contentOptions.fallbackDocsDir,
|
|
586
589
|
documents: contentCategories.flatMap((category2) => category2.pages)
|
|
587
|
-
}
|
|
590
|
+
},
|
|
591
|
+
originalProject.syntaxGrammars,
|
|
592
|
+
originalProject.config.syntaxHighlighting?.themes
|
|
588
593
|
);
|
|
589
594
|
const description = typeof document.frontmatter.description === "string" ? document.frontmatter.description : null;
|
|
590
595
|
const hrefFor = (pageSlug) => getDocsHref4(project, source, pageSlug);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexibase/rdx-next",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "The Next.js runtime for RDX documentation projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"next-mdx-remote": "^6.0.0",
|
|
53
53
|
"remark-gfm": "^4",
|
|
54
54
|
"typescript": "6.0.3",
|
|
55
|
-
"@lexibase/rdx-core": "3.0
|
|
56
|
-
"@lexibase/rdx-types": "2.
|
|
55
|
+
"@lexibase/rdx-core": "3.1.0",
|
|
56
|
+
"@lexibase/rdx-types": "2.4.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@lexibase/rdx-ui": "^3.5.0",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"next": "^16.4.2",
|
|
82
82
|
"react": "19.3.1",
|
|
83
83
|
"react-dom": "19.3.1",
|
|
84
|
-
"@
|
|
84
|
+
"@rdx/typescript-config": "1.0.0",
|
|
85
85
|
"@rdx/eslint-config": "1.0.0",
|
|
86
|
-
"@rdx
|
|
86
|
+
"@lexibase/rdx-ui": "3.5.2"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"dev": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --watch --external @lexibase/rdx-core --external @lexibase/rdx-types --external @lexibase/rdx-ui --external next --external react --external react-dom --external next-mdx-remote",
|