diff --git a/.changeset/slimy-ghosts-develop.md b/.changeset/slimy-ghosts-develop.md new file mode 100644 index 0000000000..b160ca18f3 --- /dev/null +++ b/.changeset/slimy-ghosts-develop.md @@ -0,0 +1,9 @@ +--- +'nextra-theme-blog': patch +'nextra-theme-docs': patch +'nextra': patch +--- + +- fix missing tailwind class for `json` icon in code blocks +- capitalize folders in sidebar even without index pages +- sync with nextra 3.2.4 diff --git a/docs/mdx-components.ts b/docs/mdx-components.ts index 39e51bab37..c8a8d9425d 100644 --- a/docs/mdx-components.ts +++ b/docs/mdx-components.ts @@ -1 +1,8 @@ -export { useMDXComponents } from 'nextra-theme-docs' +import { useMDXComponents as getDocsMDXComponents } from 'nextra-theme-docs' + +const docsComponents = getDocsMDXComponents() + +export const useMDXComponents: typeof getDocsMDXComponents = components => ({ + ...docsComponents, + ...components +}) diff --git a/examples/docs/mdx-components.js b/examples/docs/mdx-components.js index 39e51bab37..9dcb3cac5b 100644 --- a/examples/docs/mdx-components.js +++ b/examples/docs/mdx-components.js @@ -1 +1,8 @@ -export { useMDXComponents } from 'nextra-theme-docs' +import { useMDXComponents as getDocsMDXComponents } from 'nextra-theme-docs' + +const docsComponents = getDocsMDXComponents() + +export const useMDXComponents = components => ({ + ...docsComponents, + ...components +}) diff --git a/examples/docs/src/app/docs/[[...mdxPath]]/page.jsx b/examples/docs/src/app/docs/[[...mdxPath]]/page.jsx index cd871918c2..73ba427b4e 100644 --- a/examples/docs/src/app/docs/[[...mdxPath]]/page.jsx +++ b/examples/docs/src/app/docs/[[...mdxPath]]/page.jsx @@ -1,7 +1,7 @@ /* eslint-disable react-hooks/rules-of-hooks -- false positive, useMDXComponents are not react hooks */ -import { useMDXComponents } from 'nextra-theme-docs' import { generateStaticParamsFor, importPage } from 'nextra/pages' +import { useMDXComponents } from '../../../../mdx-components' export const generateStaticParams = generateStaticParamsFor('mdxPath') diff --git a/examples/docs/src/content/_meta.js b/examples/docs/src/content/_meta.js index b01fed3b76..6bf0716436 100644 --- a/examples/docs/src/content/_meta.js +++ b/examples/docs/src/content/_meta.js @@ -1,7 +1,7 @@ export default { index: '', 'get-started': '', - features: 'Features', - themes: 'Themes', - advanced: 'Advanced' + features: '', + themes: '', + advanced: '' } diff --git a/packages/nextra-theme-docs/src/components/sidebar.tsx b/packages/nextra-theme-docs/src/components/sidebar.tsx index 8c019f13ce..16072154d7 100644 --- a/packages/nextra-theme-docs/src/components/sidebar.tsx +++ b/packages/nextra-theme-docs/src/components/sidebar.tsx @@ -272,10 +272,7 @@ const Menu = forwardRef(