Skip to content

Commit a3fd195

Browse files
committed
⬆️ upgrade nextra
1 parent 27f3b6f commit a3fd195

16 files changed

Lines changed: 1162 additions & 856 deletions

File tree

components/Brand/index.tsx

Lines changed: 0 additions & 46 deletions
This file was deleted.

components/Footer/index.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

next.config.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
22
const nextra = require("nextra");
33

4-
/**
5-
* @type {import("nextra").NextraConfig}
6-
*/
7-
const config = {
4+
const withNextra = nextra({
85
theme: "nextra-theme-docs",
9-
themeConfig: "./theme.config.js",
10-
unstable_flexsearch: true,
11-
unstable_staticImage: true,
12-
};
13-
14-
const withNextra = nextra(config);
15-
16-
module.exports = withNextra({
17-
compiler: {
18-
styledComponents: true,
19-
},
6+
themeConfig: "./theme.config.tsx",
207
});
8+
9+
module.exports = withNextra();

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,12 @@
1111
"author": "Shu Ding",
1212
"license": "MIT",
1313
"dependencies": {
14-
"@onruntime/next-link": "^0.1.5",
15-
"@reach/skip-nav": "^0.18.0",
16-
"@types/styled-components": "^5.1.26",
1714
"next": "^12.1.6",
18-
"next-seo": "^6.0.0",
19-
"nextra": "2.0.0-alpha.56",
20-
"nextra-theme-docs": "2.0.0-alpha.59",
15+
"nextra": "^2.13.4",
16+
"nextra-theme-docs": "^2.13.4",
2117
"react": "^18.2.0",
2218
"react-dom": "^18.2.0",
23-
"react-markdown": "^9.0.0",
24-
"styled-components": "^5.3.5",
19+
"react-markdown": "^9.0.1",
2520
"urlcat": "^3.0.0"
2621
},
2722
"devDependencies": {

pages/_app.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function App({ Component, pageProps }) {
2+
// eslint-disable-next-line react/jsx-filename-extension
3+
return <Component {...pageProps} />;
4+
}

pages/_app.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

pages/_document.tsx

Lines changed: 0 additions & 55 deletions
This file was deleted.
File renamed without changes.
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { useSSG } from 'nextra/ssg';
2-
import Markdown from 'react-markdown';
1+
import { useSSG } from "nextra/ssg";
2+
import Markdown from "react-markdown";
33

44
export const getStaticProps = ({ params }) => {
5-
return fetch(`https://raw.githubusercontent.com/onRuntime/.github/master/.github/CODE_OF_CONDUCT.md`)
5+
return fetch(
6+
"https://raw.githubusercontent.com/onRuntime/.github/master/.github/CODE_OF_CONDUCT.md",
7+
)
68
.then((res) => res.text())
79
.then((text) => ({
810
props: {
@@ -14,17 +16,13 @@ export const getStaticProps = ({ params }) => {
1416
},
1517
// The page will be considered as stale and regenerated every 60 seconds.
1618
revalidate: 60,
17-
}))
18-
}
19+
}));
20+
};
1921

2022
export const CodeOfConduct = ({ ssg }) => {
2123
const { markdown } = useSSG(ssg);
22-
23-
return (
24-
<Markdown>
25-
{markdown}
26-
</Markdown>
27-
)
28-
}
2924

30-
<CodeOfConduct />
25+
return <Markdown>{markdown}</Markdown>;
26+
};
27+
28+
<CodeOfConduct />;

0 commit comments

Comments
 (0)