Skip to content

Commit

Permalink
create-next-app: add head to template (#42357)
Browse files Browse the repository at this point in the history
<!--
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.
  • Loading branch information
wyattjoh committed Nov 2, 2022
1 parent 2a9e2f1 commit 8715fe0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
9 changes: 9 additions & 0 deletions packages/create-next-app/templates/app/js/app/head.jsx
Original file line number Diff line number Diff line change
@@ -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" />
</>
)
}
10 changes: 5 additions & 5 deletions packages/create-next-app/templates/app/js/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)
Expand Down
9 changes: 9 additions & 0 deletions packages/create-next-app/templates/app/ts/app/head.tsx
Original file line number Diff line number Diff line change
@@ -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" />
</>
)
}
10 changes: 5 additions & 5 deletions packages/create-next-app/templates/app/ts/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)
Expand Down

0 comments on commit 8715fe0

Please sign in to comment.