create-next-app: add head to template (#42357)
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> Added the `head.{j,t}sx` files to the `create-next-app` templates.
This commit is contained in:
parent
2a9e2f18e3
commit
8715fe0360
4 changed files with 28 additions and 10 deletions
9
packages/create-next-app/templates/app/js/app/head.jsx
Normal file
9
packages/create-next-app/templates/app/js/app/head.jsx
Normal file
|
@ -0,0 +1,9 @@
|
|||
export default function Head() {
|
||||
return (
|
||||
<>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</>
|
||||
)
|
||||
}
|
|
@ -3,11 +3,11 @@ import './globals.css'
|
|||
export default function RootLayout({ children }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
{/*
|
||||
<head /> will contain the components returned by the nearest parent
|
||||
head.jsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
|
||||
*/}
|
||||
<head />
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
)
|
||||
|
|
9
packages/create-next-app/templates/app/ts/app/head.tsx
Normal file
9
packages/create-next-app/templates/app/ts/app/head.tsx
Normal file
|
@ -0,0 +1,9 @@
|
|||
export default function Head() {
|
||||
return (
|
||||
<>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</>
|
||||
)
|
||||
}
|
|
@ -7,11 +7,11 @@ export default function RootLayout({
|
|||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
{/*
|
||||
<head /> will contain the components returned by the nearest parent
|
||||
head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
|
||||
*/}
|
||||
<head />
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue