From e8f51b0ef21dffbc09205e626ed4dba3b22c603c Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Thu, 31 Oct 2024 03:19:56 +0300 Subject: [PATCH] aa --- .github/workflows/lint.yml | 5 +++-- .github/workflows/nextjs-bundle-analysis.yml | 3 ++- .github/workflows/release.yml | 3 ++- .github/workflows/test.yml | 5 +++-- docs/app/docs/built-ins/head/page.mdx | 2 +- packages/nextra/src/client/setup-page.tsx | 5 +++-- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1604a2249e..2feac10882 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,9 +17,10 @@ jobs: - name: Checkout Main uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 - - name: Use Node.js + - name: Install Node.js uses: actions/setup-node@v4 with: node-version-file: .node-version diff --git a/.github/workflows/nextjs-bundle-analysis.yml b/.github/workflows/nextjs-bundle-analysis.yml index fc65fa9006..0ccd00d767 100644 --- a/.github/workflows/nextjs-bundle-analysis.yml +++ b/.github/workflows/nextjs-bundle-analysis.yml @@ -27,7 +27,8 @@ jobs: - name: Checkout Main uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 - name: Install Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af09a24f44..d8ad91084c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,8 @@ jobs: - name: Checkout Main uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 - name: Install Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5fc3264b0f..fcdd5f3e86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,9 +21,10 @@ jobs: - name: Checkout Main uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 - - name: Use Node.js + - name: Install Node.js uses: actions/setup-node@v4 with: node-version-file: .node-version diff --git a/docs/app/docs/built-ins/head/page.mdx b/docs/app/docs/built-ins/head/page.mdx index b422201ff0..fc222cb264 100644 --- a/docs/app/docs/built-ins/head/page.mdx +++ b/docs/app/docs/built-ins/head/page.mdx @@ -91,7 +91,7 @@ website: | Hue (H) | Saturation (S) | Lightness (L) | Background Color | | -------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | ------------------ | -| | | | | +| | | | | > [!TIP] > diff --git a/packages/nextra/src/client/setup-page.tsx b/packages/nextra/src/client/setup-page.tsx index 5814b5dd5d..5b6b469b0f 100644 --- a/packages/nextra/src/client/setup-page.tsx +++ b/packages/nextra/src/client/setup-page.tsx @@ -3,17 +3,18 @@ * This file should be never used directly, only in loader.ts */ -import { useMDXComponents } from 'next-mdx-import-source-file' +import { useMDXComponents as getMDXComponents } from 'next-mdx-import-source-file' import type { ComponentProps, FC } from 'react' import { createElement } from 'react' import type { Heading, MDXWrapper, PageOpts } from '../types' +const Wrapper = getMDXComponents().wrapper + export function HOC_MDXWrapper( MDXContent: MDXWrapper, hocProps: PageOpts & { toc: Heading[] } ): FC> { return function MDXWrapper(props) { - const Wrapper = useMDXComponents().wrapper const children = createElement(MDXContent, props) return Wrapper ? {children} : children