Skip to content

Commit 3210221

Browse files
committed
Nextra 4 upgrade
1 parent 2ff3224 commit 3210221

41 files changed

Lines changed: 6487 additions & 9395 deletions

Some content is hidden

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

web/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ yarn-error.log*
2828

2929
# typescript
3030
*.tsbuildinfo
31-
next-env.d.ts
31+
next-env.d.ts
32+
_pagefind

web/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/

web/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.17.0

web/eslint.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
];
15+
16+
export default eslintConfig;

web/mdx-components.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { useMDXComponents as getThemeComponents } from "nextra-theme-docs"; // nextra-theme-blog or your custom theme
2+
3+
// Get the default MDX components
4+
const themeComponents = getThemeComponents();
5+
6+
// Merge components
7+
export function useMDXComponents(components) {
8+
return {
9+
...themeComponents,
10+
...components,
11+
};
12+
}

web/next.config.js

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

web/next.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import nextra from "nextra";
2+
3+
const nextConfig = {
4+
images: {
5+
domains: ["github.com"],
6+
},
7+
};
8+
9+
// Set up Nextra with its configuration
10+
const withNextra = nextra({});
11+
12+
// Export the final Next.js config with Nextra included
13+
export default withNextra({
14+
...nextConfig,
15+
});

0 commit comments

Comments
 (0)