Skip to content

Instantly share code, notes, and snippets.

@samurai71
Created August 27, 2024 15:10
Show Gist options
  • Save samurai71/19bc75fe7d4793c467d0ddb1f9dde141 to your computer and use it in GitHub Desktop.
Save samurai71/19bc75fe7d4793c467d0ddb1f9dde141 to your computer and use it in GitHub Desktop.
Next SEO

export const metadata = { title: 'My Awesome Website', description: 'Discover amazing content and services on My Awesome Website',

// Basic metadata applicationName: 'My Awesome App', authors: [{ name: 'Stephen Omoregie', url: 'https://cre8stevedev.me' }], generator: 'Next.js', keywords: ['next.js', 'react', 'javascript'], referrer: 'origin-when-cross-origin', themeColor: '#4285f4', colorScheme: 'dark', viewport: 'width=device-width, initial-scale=1', creator: 'Stephen Omoregie', publisher: 'Cre8steve Dev',

// Open Graph metadata openGraph: { title: 'My Awesome Website', description: 'Discover amazing content and services', url: 'https://cre8stevedev.me', siteName: 'My Awesome Website', images: [ { url: 'https://myawesomewebsite.com/og-image.jpg', width: 1200, // This is the recommended size in pixels height: 630, alt: 'My Awesome Website og-image', }, ], locale: 'en_US', type: 'website', },

// Twitter metadata twitter: { card: 'summary_large_image', title: 'My Awesome Website', description: 'Discover amazing content and services', creator: '@cre8stevedev', images: ['https://myawesomewebsite.com/twitter-image.jpg'], },

// Verification for search engines // You can get these values from the respective // search engines when you submit your site for // indexing verification: { google: 'google-site-verification=1234567890', yandex: 'yandex-verification=1234567890', yahoo: 'yahoo-site-verification=1234567890', },

// Alternate languages alternates: { canonical: 'https://myawesomewebsite.com', languages: { 'en-US': 'https://myawesomewebsite.com/en-US', 'es-ES': 'https://myawesomewebsite.com/es-ES', }, },

// Icons icons: { icon: '/favicon.ico', shortcut: '/favicon-16x16.png', apple: '/apple-touch-icon.png', other: [ { rel: 'apple-touch-icon-precomposed', url: '/apple-touch-icon-precomposed.png', }, ], },

// Manifest manifest: '/site.webmanifest',

// App-specific metadata appleWebApp: { capable: true, title: 'My Awesome App', statusBarStyle: 'black-translucent', },

// Robots directives robots: { index: true, follow: true, nocache: true, googleBot: { index: true, follow: true, noimageindex: true, 'max-video-preview': -1, 'max-image-preview': 'large', 'max-snippet': -1, }, },

// Format detection formatDetection: { email: false, address: false, telephone: false, }, };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment