Skip to content

Commit 9144fc5

Browse files
Upgrade docs to Nextra 4 and Next.js 15 (#967)
* Migrate documentation to App Router and update dependencies * Update GitHub Actions docs workflows to fetch full git history
1 parent 6c218f0 commit 9144fc5

File tree

41 files changed

+893
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+893
-434
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
2830

2931
- uses: pnpm/action-setup@v4
3032

.github/workflows/test-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2325

2426
- uses: pnpm/action-setup@v4
2527

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
}
2222
},
2323
"noDefaultExport": "off",
24-
"useNamingConvention": "off"
24+
"useNamingConvention": "off",
25+
"noImplicitBoolean": "off"
2526
},
2627
"correctness": {
2728
"noNodejsModules": "off",
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1+
import type { NextConfig } from 'next';
12
import nextra from 'nextra';
23

34
const basePath = process.env.CI ? '/next-shared-cache' : '';
45

5-
const withNextra = nextra({
6-
theme: 'nextra-theme-docs',
7-
themeConfig: './theme.config.jsx',
8-
staticImage: true,
9-
});
10-
11-
export default withNextra({
6+
const nextConfig: NextConfig = {
127
output: 'export',
138
basePath,
149
images: { unoptimized: true },
1510
env: {
1611
NEXT_PUBLIC_BASE_URL: basePath,
1712
},
18-
eslint: {
19-
ignoreDuringBuilds: true,
20-
},
21-
});
13+
};
14+
15+
const withNextra = nextra({});
16+
17+
export default withNextra(nextConfig);

docs/cache-handler-docs/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"build:docs": "next build",
8-
"dev:docs": "next dev",
7+
"build:docs": "next build && pagefind --site .next/server/app --output-path out/_pagefind",
8+
"dev:docs": "next dev --turbo",
99
"eslint:check": "next lint",
1010
"eslint:fix": "next lint --fix",
1111
"start:docs": "serve out"
1212
},
1313
"dependencies": {
14-
"next": "14.2.15",
15-
"nextra": "3.2.4",
16-
"nextra-theme-docs": "3.2.4",
17-
"react": "18.3.1",
18-
"react-dom": "18.3.1"
14+
"next": "15.1.6",
15+
"nextra": "4.2.4",
16+
"nextra-theme-docs": "4.2.4",
17+
"react": "19.0.0",
18+
"react-dom": "19.0.0"
1919
},
2020
"devDependencies": {
2121
"@repo/eslint-config": "workspace:*",
2222
"@repo/typescript-config": "workspace:*",
2323
"@types/node": "22.13.1",
24-
"@types/react": "18.3.12",
25-
"@types/react-dom": "18.3.1",
24+
"@types/react": "19.0.8",
25+
"@types/react-dom": "19.0.3",
2626
"eslint": "9.20.0",
27+
"pagefind": "1.3.0",
2728
"serve": "14.2.4",
2829
"typescript": "5.7.3"
2930
}
-854 Bytes
Binary file not shown.
-2.44 KB
Binary file not shown.

docs/cache-handler-docs/src/pages/_meta.ts renamed to docs/cache-handler-docs/src/app/_meta.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export default {
1+
import type { MetaRecord } from 'nextra';
2+
3+
const meta: MetaRecord = {
24
'-- Getting Started': {
35
type: 'separator',
46
title: 'Getting Started',
@@ -12,14 +14,12 @@ export default {
1214
},
1315
redis: 'Built-in Redis Handler',
1416
'cluster-example': {
15-
title: 'Redis Cluster example',
17+
title: 'Redis Cluster example',
1618
href: 'https://github.com/mauroaccornero/cache-handler-redis-cluster-example',
17-
newWindow: true,
1819
},
1920
'k8s-example': {
20-
title: 'Kubernetes example',
21+
title: 'Kubernetes example',
2122
href: 'https://github.com/ezeparziale/nextjs-k8s',
22-
newWindow: true,
2323
},
2424
'-- API Reference': {
2525
type: 'separator',
@@ -32,19 +32,19 @@ export default {
3232
type: 'separator',
3333
title: 'Troubleshooting',
3434
},
35-
troubleshooting: '',
35+
troubleshooting: 'Troubleshooting',
3636
'-- More': {
3737
type: 'separator',
3838
title: 'More',
3939
},
4040
'official-example': {
41-
title: 'Official Next.js template',
41+
title: 'Official Next.js template',
4242
href: 'https://github.com/vercel/next.js/tree/canary/examples/cache-handler-redis',
43-
newWindow: true,
4443
},
4544
'next.js-link': {
46-
title: 'Next.js Configuring caching Docs',
45+
title: 'Next.js Configuring caching Docs',
4746
href: 'https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching',
48-
newWindow: true,
4947
},
5048
};
49+
50+
export default meta;

0 commit comments

Comments
 (0)