Skip to content

Commit 36f96f3

Browse files
committed
docs: fix next-seo and next bump
1 parent 5cae24c commit 36f96f3

File tree

12 files changed

+35
-31
lines changed

12 files changed

+35
-31
lines changed

examples/next-ts/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference path="./.next/types/routes.d.ts" />
3+
import "./.next/dev/types/routes.d.ts"
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

examples/next-ts/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
2-
eslint: { ignoreDuringBuilds: true },
32
typescript: { ignoreBuildErrors: true },
43
experimental: {
54
externalDir: true,
65
},
6+
turbopack: {},
77
webpack: (config) => {
88
config.module.rules.push({
99
test: /\.m?js$/,

examples/next-ts/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"esModuleInterop": true,
66
"forceConsistentCasingInFileNames": true,
77
"isolatedModules": true,
8-
"jsx": "preserve",
8+
"jsx": "react-jsx",
99
"lib": ["dom", "esnext", "dom.iterable"],
1010
"module": "esnext",
1111
"moduleResolution": "node",
@@ -17,8 +17,8 @@
1717
"skipLibCheck": true,
1818
"strict": false,
1919
"target": "esnext",
20-
"incremental": true,
20+
"incremental": true
2121
},
2222
"exclude": ["node_modules"],
23-
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js"],
23+
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js"]
2424
}

pnpm-lock.yaml

Lines changed: 2 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts"
3+
import "./.next/types/routes.d.ts"
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"react": "19.2.0",
7878
"react-dom": "19.2.0",
7979
"react-icons": "5.5.0",
80-
"refractor": "^5.0.0",
80+
"refractor": "^4.9.0",
8181
"unist-util-visit": "5.0.0",
8282
"use-match-media-hook": "1.0.1",
8383
"velite": "^0.3.0"

website/pages/_app.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { DefaultSeo } from "next-seo"
1+
import { generateDefaultSeo } from "next-seo/pages"
22
import { ThemeProvider } from "next-themes"
3+
import Head from "next/head"
34
import siteConfig from "site.config"
45
import "../styles/index.css"
56
import "../styles/machines/index.css"
@@ -8,7 +9,7 @@ import "../styles/prism.css"
89
export default function App({ Component, pageProps }: any) {
910
return (
1011
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
11-
<DefaultSeo {...siteConfig.seo} />
12+
<Head>{generateDefaultSeo(siteConfig.seo)}</Head>
1213
<Component {...pageProps} />
1314
</ThemeProvider>
1415
)

website/pages/components/[...slug].tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
} from "lib/contentlayer-utils"
1010
import type { Framework } from "lib/framework-utils"
1111
import type { GetStaticPaths, GetStaticProps } from "next"
12-
import { NextSeo } from "next-seo"
12+
import { generateNextSeo } from "next-seo/pages"
13+
import Head from "next/head"
1314

1415
type PageProps = {
1516
doc: Component
@@ -20,7 +21,9 @@ export default function ComponentPage({ doc, framework }: PageProps) {
2021
const mdx = useMDX(doc.body.code)
2122
return (
2223
<FrameworkProvider value={framework}>
23-
<NextSeo title={doc.title} description={doc.description} />
24+
<Head>
25+
{generateNextSeo({ title: doc.title, description: doc.description })}
26+
</Head>
2427
<DocsLayout doc={doc}>{mdx}</DocsLayout>
2528
</FrameworkProvider>
2629
)

website/pages/guides/[slug].tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import { useMDX } from "components/mdx-components"
33
import DocsLayout from "layouts/docs"
44
import { getGuideDoc, getGuidePaths } from "lib/contentlayer-utils"
55
import type { GetStaticPaths, GetStaticProps } from "next"
6-
import { NextSeo } from "next-seo"
6+
import { generateNextSeo } from "next-seo/pages"
7+
import Head from "next/head"
78

89
export default function GuidePage({ doc }: { doc: Guide }) {
910
const Component = useMDX(doc?.body.code)
1011
if (!doc) return null
1112
return (
1213
<>
13-
<NextSeo title={doc.title} description={doc.description} />
14+
<Head>
15+
{generateNextSeo({ title: doc.title, description: doc.description })}
16+
</Head>
1417
<DocsLayout doc={doc}>{Component}</DocsLayout>
1518
</>
1619
)

website/pages/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import { Blockquote } from "components/ui/blockquote"
2020
import { Button, ButtonLink } from "components/ui/button"
2121
import { Icon } from "components/ui/icon"
2222
import { Section } from "components/ui/section"
23-
import { NextSeo } from "next-seo"
23+
import { generateNextSeo } from "next-seo/pages"
24+
import Head from "next/head"
2425
import Image from "next/image"
2526
import { type ElementType } from "react"
2627
import siteConfig from "site.config"
@@ -58,7 +59,7 @@ function FeatureItem(props: FeatureItemProps) {
5859
export default function Home() {
5960
return (
6061
<Box>
61-
<NextSeo title={siteConfig.title} />
62+
<Head>{generateNextSeo({ title: siteConfig.title })}</Head>
6263

6364
<TopNavigation />
6465

0 commit comments

Comments
 (0)