Skip to content

Commit ccdef1e

Browse files
authored
feat(docs): upgrade to nextra 4 (#301)
1 parent 8f27c3f commit ccdef1e

File tree

35 files changed

+372
-334
lines changed

35 files changed

+372
-334
lines changed

integration-tests/typescript-fetch/src/generate-release-notes.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ export async function generateReleaseNotes() {
3434
${it.body
3535
?.split("\n")
3636
.filter((it) => it.startsWith("#") === false)
37+
.map((it) => it.trim())
3738
.join("\n")}
38-
`,
39+
`,
3940
)
4041
}
4142

@@ -46,7 +47,11 @@ ${it.body
4647

4748
async function main() {
4849
const notes = await generateReleaseNotes()
49-
const result = `import { Callout, Steps } from 'nextra/components'
50+
const result = `---
51+
title: Release Notes
52+
---
53+
54+
import { Callout, Steps } from 'nextra/components'
5055
5156
# Release notes
5257
@@ -63,7 +68,7 @@ ${notes.join("\n")}
6368
fs.writeFileSync(
6469
path.resolve(
6570
__dirname,
66-
"../../../packages/documentation/src/pages/reference/release-notes.mdx",
71+
"../../../packages/documentation/src/app/reference/release-notes/page.mdx",
6772
),
6873
result.replace(/\r\n/g, "\n"),
6974
"utf-8",

packages/documentation/next.config.mjs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,8 @@ const nextConfig = {
2323

2424
return config
2525
},
26-
async redirects() {
27-
return [{source: "/", destination: "/overview/about", permanent: false}]
28-
},
2926
}
3027

31-
const withNextra = nextra({
32-
theme: "nextra-theme-docs",
33-
themeConfig: "./src/theme.config.tsx",
34-
})
28+
const withNextra = nextra({})
3529

3630
export default withNextra(nextConfig)

packages/documentation/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"monaco-editor": "^0.52.2",
3333
"monaco-editor-auto-typings": "^0.4.6",
3434
"next": "15.2.2",
35-
"nextra": "^3.3.1",
36-
"nextra-theme-docs": "^3.3.1",
35+
"nextra": "^4.2.16",
36+
"nextra-theme-docs": "^4.2.16",
3737
"node-polyfill-webpack-plugin": "^4.1.0",
3838
"react": "19.0.0",
3939
"react-dom": "19.0.0",

packages/documentation/src/pages/_meta.tsx renamed to packages/documentation/src/app/_meta.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ export default {
33
"getting-started": "Getting Started",
44
guides: "Guides",
55
reference: "Reference",
6-
404: {
7-
display: "hidden",
8-
title: "",
9-
},
106
index: {
117
display: "hidden",
128
title: "",
@@ -19,6 +15,8 @@ export default {
1915
playground: {
2016
type: "page",
2117
theme: {
18+
pagination: false,
19+
toc: false,
2220
layout: "full",
2321
},
2422
},

packages/documentation/src/pages/getting-started/quick-start.mdx renamed to packages/documentation/src/app/getting-started/quick-start/page.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: Quick Start
3+
---
4+
15
import {Steps, Tabs} from "nextra/components"
26

37
# Quick Start

packages/documentation/src/pages/getting-started/tips-for-writing-specifications.mdx renamed to packages/documentation/src/app/getting-started/tips-for-writing-specifications/page.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: Tips for writing specifications
3+
---
4+
15
# Tips for writing a good specification
26

37
Garbage in, garbage out applies especially to code generation tools. In short the more detailed, and accurate the
File renamed without changes.

packages/documentation/src/pages/guides/client-templates/typescript-angular.mdx renamed to packages/documentation/src/app/guides/client-templates/typescript-angular/page.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: typescript-angular
3+
---
4+
15
import {Callout, Tabs} from 'nextra/components'
26

37
# Using the `typescript-angular` template

packages/documentation/src/pages/guides/client-templates/typescript-axios.mdx renamed to packages/documentation/src/app/guides/client-templates/typescript-axios/page.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: typescript-axios
3+
---
4+
15
import {Callout, Tabs} from 'nextra/components'
26

37
# Using the `typescript-axios` template

packages/documentation/src/pages/guides/client-templates/typescript-fetch.mdx renamed to packages/documentation/src/app/guides/client-templates/typescript-fetch/page.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: typescript-fetch
3+
---
4+
15
import {Callout, Tabs} from 'nextra/components'
26

37
# Using the `typescript-fetch` template

0 commit comments

Comments
 (0)