Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use metadata export #164

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions app/head.jsx

This file was deleted.

50 changes: 48 additions & 2 deletions app/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
import { Layout } from '@/components/dom/Layout'
import '@/global.css'

const title = 'React Three Next Starter'
const url = process.env.NODE_ENV ==="development" ? 'http://localhost:3000' : 'https://react-three-next.vercel.app'
const description = 'The easiest and fastest way to create a 3D website using React Three Fiber and NextJS'
const author = 'Poimandres'
const twitter = '@pmndrs'

/**
* @type {import('next').Viewport}
*/
export const viewport = {
themeColor: 'black',
}

/**
* @type {import('next').Metadata}
*/
export const metadata = {
title: 'Next.js + Three.js',
description: 'A minimal starter for Nextjs + React-three-fiber and Threejs.',
title: title,
description: description,
authors: [{ name: author, url: 'https://docs.pmnd.rs' }],
publisher: author,
keywords: 'Software Engineer,Product Manager,Project Manager,Data Scientist,Computer Scientist',
robots: 'index,follow',
metadataBase: url,
openGraph: {
title: title,
type: 'website',
url: url,
images: [{ url: '/icons/share.png', width: 800, height: 800 }],
siteName: title,
description: description,
},
twitter: {
card: 'summary',
site: twitter,
},
manifest: '/manifest.json',
formatDetection: { email: true, telephone: true },
icons: {
icon: [{ url: '/icons/favicon.ico' }, { url: '/icons/favicon-32x32.png', type: 'image/png' }],
shortcut: ['/icons/apple-touch-icon.png'],
apple: [
{ url: '/icons/apple-touch-icon.png' },
{ url: '/icons/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
{ url: '/icons/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
{ url: '/icons/apple-touch-icon.png', sizes: '180x180', type: 'image/png' },
],
other: [{ rel: 'mask-icon', url: '/icons/safari-pinned-tab.svg', color: '#000000' }],
},
}

export default function RootLayout({ children }) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"private": true,
"engines": {
"node": ">=14"
"node": ">=18"
},
"scripts": {
"lint": "next lint --fix --dir app",
Expand Down