@lexibase/rdx-next 4.1.0 → 4.2.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/bin/cli.mjs CHANGED
@@ -74,7 +74,7 @@ export async function runRdxCli({ templateDir } = {}) {
74
74
  ['--help', '-h'].includes(commandArgs[0])
75
75
  ) {
76
76
  console.log(
77
- 'Usage: rdx check\nValidate static MDX links, section anchors and local public/ files without building the site.'
77
+ 'Usage: rdx check\nValidate static Markdown and MDX links, section anchors and local public/ files without building the site.'
78
78
  )
79
79
  return
80
80
  }
package/config.mjs CHANGED
@@ -49,7 +49,7 @@ async function contentFiles(directory) {
49
49
  const filename = path.join(directory, entry.name)
50
50
  if (entry.isDirectory()) return contentFiles(filename)
51
51
  return entry.isFile() &&
52
- (entry.name.endsWith('.mdx') || entry.name === '_category.json')
52
+ (/\.mdx?$/.test(entry.name) || entry.name === '_category.json')
53
53
  ? [filename]
54
54
  : []
55
55
  })
@@ -19,7 +19,7 @@ import { DocsSearch } from "@lexibase/rdx-ui/components/docs-search";
19
19
  import { Home } from "@lexibase/rdx-ui/components/home";
20
20
  import { SkipLink } from "@lexibase/rdx-ui/components/skip-link";
21
21
  import { FooterCredit } from "@lexibase/rdx-ui/components/footer-credit";
22
- import { Logo } from "@lexibase/rdx-ui/components/logo";
22
+ import { BrandLogo } from "@lexibase/rdx-ui/components/brand-logo";
23
23
  import { getMdxComponents } from "@lexibase/rdx-ui/components/mdx-components";
24
24
  import { getMessages, formatMessage } from "@lexibase/rdx-ui/lib/i18n";
25
25
  import { LocaleProvider } from "@lexibase/rdx-ui/providers/locale-provider";
@@ -49,6 +49,7 @@ function compileDocumentation(source, components, links) {
49
49
  blockJS: true,
50
50
  blockDangerousJS: true,
51
51
  mdxOptions: {
52
+ format: links?.sourcePath.endsWith(".md") ? "md" : "mdx",
52
53
  remarkPlugins: [
53
54
  remarkGfm,
54
55
  remarkDocumentationComponents,
@@ -96,6 +97,7 @@ function getSearchResponse(project, key) {
96
97
  description: page.description,
97
98
  category: category.title,
98
99
  href: getDocsHref(project, source, page.slug),
100
+ sourcePath: page.sourcePath,
99
101
  content: getDocument(page.slug, options)?.content ?? ""
100
102
  }))
101
103
  );
@@ -287,7 +289,6 @@ function RdxHeader({
287
289
  href: getDocsHref3(project, edition, destination)
288
290
  };
289
291
  });
290
- const BrandLogo = config.navbar?.logo ?? Logo;
291
292
  return /* @__PURE__ */ jsx(
292
293
  Navbar,
293
294
  {
@@ -301,7 +302,7 @@ function RdxHeader({
301
302
  }
302
303
  ) : void 0,
303
304
  siteTitle: config.metadata.applicationName,
304
- logo: /* @__PURE__ */ jsx(BrandLogo, { className: "size-5" }),
305
+ logo: /* @__PURE__ */ jsx(BrandLogo, { source: config.navbar?.logo, className: "size-5" }),
305
306
  homeHref: config.homepage?.enabled ? "/" : getDocsHref3(project),
306
307
  docsHref: getDocsHref3(project, source),
307
308
  languageMenu: project.localization ? /* @__PURE__ */ jsx(
@@ -324,7 +325,6 @@ function HomePage({ project }) {
324
325
  if (!config.homepage?.enabled) redirect(getDocsHref3(project));
325
326
  const homepage = config.homepage;
326
327
  const CustomHome = homepage.component;
327
- const BrandLogo = config.navbar?.logo ?? Logo;
328
328
  return /* @__PURE__ */ jsxs(Fragment, { children: [
329
329
  /* @__PURE__ */ jsx(RdxHeader, { project }),
330
330
  /* @__PURE__ */ jsx(
@@ -337,7 +337,13 @@ function HomePage({ project }) {
337
337
  Home,
338
338
  {
339
339
  title: homepage.title ?? config.metadata.applicationName,
340
- logo: /* @__PURE__ */ jsx(BrandLogo, { className: "size-52 hover:scale-105 hover:rotate-1 transition-[scale,rotation] duration-1000" }),
340
+ logo: /* @__PURE__ */ jsx(
341
+ BrandLogo,
342
+ {
343
+ source: config.navbar?.logo,
344
+ className: "size-52 hover:scale-105 hover:rotate-1 transition-[scale,rotation] duration-1000"
345
+ }
346
+ ),
341
347
  description: homepage.description,
342
348
  buttons: homepage.buttons
343
349
  }
@@ -349,7 +355,6 @@ function HomePage({ project }) {
349
355
  function NotFoundPage({ project }) {
350
356
  if (project.localization) {
351
357
  const { config, localization } = project;
352
- const BrandLogo = config.navbar?.logo ?? Logo;
353
358
  return /* @__PURE__ */ jsx(
354
359
  LocalizedNotFound,
355
360
  {
@@ -361,7 +366,7 @@ function NotFoundPage({ project }) {
361
366
  siteTitle: config.metadata.applicationName,
362
367
  github: config.navbar?.actions?.github,
363
368
  showToggleMode: config.navbar?.actions?.showToggleMode,
364
- logo: /* @__PURE__ */ jsx(BrandLogo, { className: "size-5" })
369
+ logo: /* @__PURE__ */ jsx(BrandLogo, { source: config.navbar?.logo, className: "size-5" })
365
370
  }
366
371
  }
367
372
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexibase/rdx-next",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "The Next.js runtime for RDX documentation projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -52,11 +52,11 @@
52
52
  "next-mdx-remote": "^6.0.0",
53
53
  "remark-gfm": "^4",
54
54
  "typescript": "6.0.3",
55
- "@lexibase/rdx-core": "2.1.0",
56
- "@lexibase/rdx-types": "2.1.0"
55
+ "@lexibase/rdx-types": "2.2.0",
56
+ "@lexibase/rdx-core": "2.2.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@lexibase/rdx-ui": "^3.3.0",
59
+ "@lexibase/rdx-ui": "^3.4.0",
60
60
  "next": "^16.4.2",
61
61
  "react": "^19.3.1",
62
62
  "react-dom": "^19.3.1"
@@ -81,9 +81,9 @@
81
81
  "next": "^16.4.2",
82
82
  "react": "19.3.1",
83
83
  "react-dom": "19.3.1",
84
- "@lexibase/rdx-ui": "3.3.0",
85
84
  "@rdx/typescript-config": "1.0.0",
86
- "@rdx/eslint-config": "1.0.0"
85
+ "@rdx/eslint-config": "1.0.0",
86
+ "@lexibase/rdx-ui": "3.4.0"
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",