Skip to content

Commit 8258b26

Browse files
committed
fix: build error, add npm mirror
1 parent e8442b6 commit 8258b26

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmmirror.com/

components/markdown/custom-mdx.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { MDXRemote, MDXRemoteProps } from 'next-mdx-remote/rsc';
33
import remarkGfm from 'remark-gfm';
44
import rehypePrettyCode from 'rehype-pretty-code';
55
import rehypeSlug from 'rehype-slug';
6-
import rehypeCodeTitles from 'rehype-code-titles';
76
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
87
import { fromHtmlIsomorphic } from 'hast-util-from-html-isomorphic';
98
import rehypePrism from 'rehype-prism-plus';
@@ -21,21 +20,9 @@ export default function CustomMDX(props: React.JSX.IntrinsicAttributes & MDXRemo
2120
remarkPlugins: [remarkGfm],
2221
rehypePlugins: [
2322
rehypeSanitize,
24-
[
25-
rehypePrettyCode,
26-
{
27-
// 'one-dark-pro' | 'one-light'
28-
theme: 'one-dark-pro',
29-
},
30-
],
23+
[rehypePrettyCode, { theme: 'one-dark-pro' }],
3124
rehypeSlug,
32-
rehypeCodeTitles,
33-
[
34-
rehypePrism,
35-
{
36-
showLineNumbers: true,
37-
},
38-
],
25+
[rehypePrism, { showLineNumbers: true }],
3926
[
4027
rehypeAutolinkHeadings,
4128
{

0 commit comments

Comments
 (0)