Skip to content

Commit 1afeb27

Browse files
authored
Merge pull request #8 from mintlify/hb/decrease-pkg-versions
Decrease package versions
2 parents db78d1b + e12b6f7 commit 1afeb27

File tree

3 files changed

+369
-58
lines changed

3 files changed

+369
-58
lines changed

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mintlify/mdx",
3-
"version": "0.0.48",
3+
"version": "0.0.49",
44
"description": "Markdown parser from Mintlify",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
@@ -57,18 +57,18 @@
5757
"react-dom": "^18.3.1"
5858
},
5959
"dependencies": {
60-
"@mdx-js/mdx": "^3.0.1",
61-
"@mdx-js/react": "^3.0.1",
62-
"@types/hast": "^3.0.4",
63-
"@types/unist": "^3.0.3",
60+
"@mdx-js/mdx": "^2.1.5",
61+
"@mdx-js/react": "^2.1.3",
62+
"@types/hast": "^3.0.0",
63+
"@types/unist": "^2.0.6",
6464
"hast-util-to-string": "^2.0.0",
65-
"next-mdx-remote": "^5.0.0",
65+
"next-mdx-remote": "^4.4.1",
6666
"refractor": "^4.8.0",
67-
"rehype-katex": "^7.0.1",
68-
"remark-gfm": "^4.0.0",
69-
"remark-math": "^6.0.0",
70-
"remark-smartypants": "^3.0.2",
71-
"unified": "^11.0.5",
67+
"rehype-katex": "^6.0.3",
68+
"remark-gfm": "^3.0.1",
69+
"remark-math": "^5.1.1",
70+
"remark-smartypants": "^2.0.0",
71+
"unified": "^10.0.0",
7272
"unist-util-visit": "^4.1.1"
7373
}
7474
}

readme.md

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@
2424
![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen?logo=github) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fmintlify.com%2F)](https://twitter.com/intent/tweet?url=&text=Check%20out%20%40mintlify)
2525

2626
</p>
27-
28-
<p>
29-
<a href="https://mintlify.com" target="_blank">
30-
<img
31-
src="https://mintlify.com/assets/og.png"
32-
alt="Mintlify"
33-
width="100%"
34-
/>
35-
</a>
36-
</p>
3727
</div>
3828

3929
# Mintlify's markdown parser
@@ -64,7 +54,7 @@ pnpm add @mintlify/mdx
6454
```tsx
6555
export const getStaticProps = (async () => {
6656
const mdxSource = await getCompiledMdx({
67-
source: "## Markdown H2",
57+
source: '## Markdown H2',
6858
});
6959

7060
return {
@@ -80,19 +70,16 @@ pnpm add @mintlify/mdx
8070
2. Pass the `mdxSource` object as props inside the `MDXComponent`.
8171

8272
```tsx
83-
export default function Page({
84-
mdxSource,
85-
}: InferGetStaticPropsType<typeof getStaticProps>) {
73+
export default function Page({ mdxSource }: InferGetStaticPropsType<typeof getStaticProps>) {
8674
return <MDXComponent {...mdxSource} />;
8775
}
8876
```
8977

9078
3. Import `@mintlify/mdx/dist/styles.css` inside your `_app.tsx` file. This file contains the styles for the code syntax highlighting.
9179

9280
```tsx
93-
import "@mintlify/mdx/dist/styles.css";
94-
95-
import { AppProps } from "next/app";
81+
import '@mintlify/mdx/dist/styles.css';
82+
import { AppProps } from 'next/app';
9683

9784
export default function App({ Component, pageProps }: AppProps) {
9885
return <Component {...pageProps} />;
@@ -106,7 +93,7 @@ pnpm add @mintlify/mdx
10693
1. Call the `getCompiledServerMdx` function inside your async React Server Component which will give you the `frontmatter` and `content`.
10794

10895
```tsx
109-
import { getCompiledServerMdx } from "@mintlify/mdx";
96+
import { getCompiledServerMdx } from '@mintlify/mdx';
11097

11198
export default async function Home() {
11299
const { content, frontmatter } = await getCompiledServerMdx({
@@ -131,19 +118,15 @@ pnpm add @mintlify/mdx
131118
2. Import `@mintlify/mdx/dist/styles.css` inside your `layout.tsx` file. This file contains the styles for the code syntax highlighting.
132119

133120
```tsx
134-
import type { Metadata } from "next";
135-
import "@mintlify/mdx/dist/styles.css";
121+
import '@mintlify/mdx/dist/styles.css';
122+
import type { Metadata } from 'next';
136123

137124
export const metadata: Metadata = {
138-
title: "Create Next App",
139-
description: "Generated by create next app",
125+
title: 'Create Next App',
126+
description: 'Generated by create next app',
140127
};
141128

142-
export default function RootLayout({
143-
children,
144-
}: {
145-
children: React.ReactNode;
146-
}) {
129+
export default function RootLayout({ children }: { children: React.ReactNode }) {
147130
return (
148131
<html lang="en">
149132
<body>{children}</body>
@@ -164,10 +147,10 @@ Similar to [next-mdx-remote](https://github.com/hashicorp/next-mdx-remote), this
164147
### getCompiledMdx
165148

166149
```tsx
167-
import { getCompiledMdx } from "@mintlify/mdx";
150+
import { getCompiledMdx } from '@mintlify/mdx';
168151

169152
const mdxSource = await getCompiledMdx({
170-
source: "## Markdown H2",
153+
source: '## Markdown H2',
171154
mdxOptions: {
172155
remarkPlugins: [
173156
// Remark plugins
@@ -182,7 +165,7 @@ const mdxSource = await getCompiledMdx({
182165
### MDXComponent
183166

184167
```tsx
185-
import { MDXComponent } from "@mintlify/mdx";
168+
import { MDXComponent } from '@mintlify/mdx';
186169

187170
<MDXComponent
188171
components={
@@ -197,7 +180,7 @@ import { MDXComponent } from "@mintlify/mdx";
197180
### getCompiledServerMdx
198181

199182
```tsx
200-
import { getCompiledServerMdx } from "@mintlify/mdx";
183+
import { getCompiledServerMdx } from '@mintlify/mdx';
201184

202185
const { content, frontmatter } = await getCompiledServerMdx({
203186
source: `---
@@ -223,7 +206,7 @@ const { content, frontmatter } = await getCompiledServerMdx({
223206
### MDXServerComponent
224207

225208
```tsx
226-
import { MDXServerComponent } from "@mintlify/mdx";
209+
import { MDXServerComponent } from '@mintlify/mdx';
227210

228211
<MDXServerComponent
229212
source="## Markdown H2"

0 commit comments

Comments
 (0)