Skip to content

Commit f62c9bb

Browse files
committed
feat: update nextra to v3
1 parent d6b530c commit f62c9bb

26 files changed

+98
-90
lines changed

bun.lockb

53.2 KB
Binary file not shown.

next-env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

next.config.js renamed to next.config.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
const withNextra = require('nextra')({
1+
import nextra from 'nextra'
2+
3+
const withNextra = nextra({
24
theme: 'nextra-theme-docs',
35
themeConfig: './theme.config.tsx',
46
});
57

6-
module.exports = withNextra({
8+
export default withNextra({
79
output: 'export',
810
images: {
911
unoptimized: true,

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
"format": "prettier . --write"
88
},
99
"dependencies": {
10-
"next": "^13.0.6",
11-
"nextra": "latest",
12-
"nextra-theme-docs": "latest",
13-
"react": "^18.2.0",
14-
"react-dom": "^18.2.0"
10+
"next": "^15.0.4",
11+
"nextra": "^3.2.4",
12+
"nextra-theme-docs": "^3.2.4",
13+
"react": "^19.0.0",
14+
"react-dom": "^19.0.0"
1515
},
1616
"devDependencies": {
17-
"@types/node": "18.11.10",
18-
"prettier": "^3.2.5",
19-
"typescript": "^4.9.3"
17+
"@types/node": "22.10.1",
18+
"prettier": "^3.4.2",
19+
"typescript": "^5.7.2"
2020
}
2121
}

pages/_app.js

-5
This file was deleted.

pages/_app.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { AppProps } from 'next/app'
2+
import '../index.css';
3+
4+
export default function MyApp({ Component, pageProps }: AppProps) {
5+
return <Component {...pageProps} />
6+
}

pages/_meta.json

-19
This file was deleted.

pages/_meta.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export default {
2+
index: 'Home',
3+
radio: 'AC Radio',
4+
scoreboard: 'AC Scoreboard',
5+
documents: 'AC Documents',
6+
gifts: 'AC Gifts',
7+
link_tebex: {
8+
title: 'Tebex',
9+
href: 'https://store.acscripts.dev/',
10+
type: 'page',
11+
newWindow: true
12+
},
13+
link_kofi: {
14+
title: 'Support us',
15+
href: 'https://ko-fi.com/antond',
16+
type: 'page',
17+
newWindow: true
18+
}
19+
}

pages/documents/_meta.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
index: 'Introduction',
3+
presets: 'Creating presets',
4+
bridge: 'Bridge',
5+
'exports-and-events': 'Exports and events',
6+
config: 'Configuration',
7+
issues: 'Common issues',
8+
}

pages/documents/_meta.json

-8
This file was deleted.

pages/documents/bridge/_meta.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
client: 'Client',
3+
server: 'Server',
4+
}

pages/documents/bridge/_meta.json

-4
This file was deleted.
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
'ox_inventory': 'ox_inventory',
3+
'qb-inventory': 'qb-inventory',
4+
}

pages/documents/bridge/server/_meta.json

-4
This file was deleted.

pages/documents/presets/_meta.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
fields: 'Available fields',
3+
structure: 'Example structure',
4+
}

pages/documents/presets/_meta.json

-4
This file was deleted.

pages/gifts/_meta.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
index: 'Introduction',
3+
install: 'Installation',
4+
config: 'Configuration',
5+
issues: 'Common issues',
6+
}

pages/gifts/_meta.json

-6
This file was deleted.

pages/radio/_meta.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
index: 'Introduction',
3+
install: 'Installation',
4+
config: 'Configuration',
5+
issues: 'Common issues',
6+
}

pages/radio/_meta.json

-6
This file was deleted.

pages/scoreboard/_meta.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
index: 'Introduction',
3+
config: 'Configuration',
4+
guides: 'Guides',
5+
issues: 'Common issues',
6+
}

pages/scoreboard/_meta.json

-6
This file was deleted.

pages/scoreboard/guides/_meta.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
'status-indicators': 'Status indicators',
3+
'ace-sections': 'ACE permissions',
4+
}

pages/scoreboard/guides/_meta.json

-4
This file was deleted.

postcss.config.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
plugins: {
3+
'@tailwindcss/postcss': {},
4+
},
5+
};

theme.config.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import { useRouter } from 'next/router';
22
import Image from 'next/image';
3-
import type { DocsThemeConfig } from 'nextra-theme-docs';
3+
import { useConfig, type DocsThemeConfig } from 'nextra-theme-docs';
44

55
const config: DocsThemeConfig = {
6-
useNextSeoProps() {
6+
head() {
77
const { asPath } = useRouter();
8-
return {
9-
titleTemplate: asPath === '/' ? 'AC Scripts' : '%s - AC Scripts',
10-
};
8+
const { title } = useConfig();
9+
10+
return (
11+
<>
12+
<title>{asPath === '/' ? 'AC Scripts' : `${title} - AC Scripts`}</title>
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
14+
<link rel="shortcut icon" href="/logo.svg" type="image/x-icon" />
15+
<script defer src="https://analytics.dejv.it/script.js" data-website-id="388963db-aa71-419c-866d-71c6c5fa6d97"></script>
16+
</>
17+
)
1118
},
12-
head: (
13-
<>
14-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
15-
<link rel="shortcut icon" href="/logo.svg" type="image/x-icon" />
16-
<script defer src="https://analytics.dejv.it/script.js" data-website-id="388963db-aa71-419c-866d-71c6c5fa6d97"></script>
17-
</>
18-
),
1919

2020
logo: (
2121
<>
@@ -30,8 +30,8 @@ const config: DocsThemeConfig = {
3030
docsRepositoryBase: 'https://github.com/acscripts/docs/tree/main',
3131
feedback: { content: null },
3232
footer: {
33-
text: (
3433
<div className="ac-footer">
34+
content: (
3535
<span>© {new Date().getFullYear()}</span>
3636
<Image src="/logo.svg" alt="logo" width={24} height={24} />
3737
<span>AC Scripts</span>

0 commit comments

Comments
 (0)