Unverified Commit 00489080 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Remove legacy head.js in examples (#52292)

* Remove legacy `head.js` from examples and use `metadata` exports
instead
* Update the report template

---------
parent f9a18134
...@@ -37,7 +37,7 @@ body: ...@@ -37,7 +37,7 @@ body:
- 'Internationalization (i18n)' - 'Internationalization (i18n)'
- 'Jest (next/jest)' - 'Jest (next/jest)'
- 'MDX (@next/mdx)' - 'MDX (@next/mdx)'
- 'Metadata (metadata, generateMetadata, next/head, head.js)' - 'Metadata (metadata, generateMetadata, next/head)'
- 'Middleware / Edge (API routes, runtime)' - 'Middleware / Edge (API routes, runtime)'
- 'Operating System (Windows, MacOS, Linux)' - 'Operating System (Windows, MacOS, Linux)'
- 'Package manager (npm, pnpm, Yarn)' - 'Package manager (npm, pnpm, Yarn)'
......
export default function Head() {
return (
<>
<title>{`i18n within app directory - Vercel Examples`}</title>
<meta
name="description"
content="How to do i18n in Next.js 13 within app directory"
/>
<link rel="icon" href="/favicon.ico" />
</>
)
}
...@@ -17,3 +17,8 @@ export default function Root({ ...@@ -17,3 +17,8 @@ export default function Root({
</html> </html>
) )
} }
export const metadata = {
title: 'i18n within app directory - Vercel Examples',
description: 'How to do i18n in Next.js 13 within app directory',
}
export default function Head() {
return (
<>
<title>Create Next App</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</>
)
}
...@@ -11,3 +11,8 @@ export default function RootLayout({ ...@@ -11,3 +11,8 @@ export default function RootLayout({
</html> </html>
) )
} }
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
const Head = () => (
<>
<title>Grafbase + Next.js</title>
</>
)
export default Head
...@@ -7,6 +7,10 @@ import { grafbase } from '../lib/grafbase' ...@@ -7,6 +7,10 @@ import { grafbase } from '../lib/grafbase'
export const revalidate = 0 export const revalidate = 0
export const metadata = {
title: 'Grafbase + Next.js',
}
const GetAllPostsDocument = graphql(/* GraphQL */ ` const GetAllPostsDocument = graphql(/* GraphQL */ `
query GetAllPosts($first: Int!) { query GetAllPosts($first: Int!) {
postCollection(first: $first) { postCollection(first: $first) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment