Skip to content

Commit

Permalink
feat(seo): add metadata and jsonld tags
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonsaldan committed Dec 26, 2024
1 parent 09993fa commit 73fa0b3
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 4 deletions.
Binary file added public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
136 changes: 132 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,35 @@ export const metadata: Metadata = {
default: "Nocturne - Your Car Thing's Second Chapter",
},
description: "When Spotify ended support, we created a new beginning. Join our growing community of users giving their Car Thing a second life with our free, open source solution.",
metadataBase: new URL('https://usenocturne.com/'),
alternates: {
canonical: '/',
},
keywords: ['Nocturne', 'Car Thing', 'Car Thing Mod', 'Car Thing Hack', 'Spotify Car Thing', 'Spotify Car Thing Mod', 'Spotify Car Thing Hack'],
authors: [{ name: 'Nocturne Team' }],
creator: 'Nocturne Team',
publisher: 'Nocturne',
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-video-preview': -1,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
openGraph: {
type: 'website',
siteName: 'Nocturne',
url: 'https://nocturne-site.vercel.app/',
url: 'https://usenocturne.com/',
title: "Nocturne - Your Car Thing's Second Chapter",
description: "When Spotify ended support, we created a new beginning. Join our growing community of users giving their Car Thing a second life with our free, open source solution.",
locale: 'en_US',
images: [
{
url: 'https://nocturne-site.vercel.app/images/og-image.png',
url: 'https://usenocturne.com/images/og-image.png',
width: 1280,
height: 640,
alt: "Nocturne - Your Car Thing's Second Chapter",
Expand All @@ -22,8 +44,98 @@ export const metadata: Metadata = {
},
twitter: {
card: 'summary_large_image',
images: ['https://nocturne-site.vercel.app/images/og-image.png'],
title: "Nocturne - Your Car Thing's Second Chapter",
description: "When Spotify ended support, we created a new beginning. Join our growing community of users giving their Car Thing a second life with our free, open source solution.",
images: ['https://usenocturne.com/images/og-image.png'],
},
other: {
'wikidata': 'Q131441227',
'wikipedia': 'https://wikipedia.org/wiki/Nocturne_(software)',
}
}

const jsonLdSoftware = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: 'Nocturne',
description: "When Spotify ended support, we created a new beginning. Join our growing community of users giving their Car Thing a second life with our free, open source solution.",
applicationCategory: 'Multimedia',
operatingSystem: 'Cross-platform',
softwareVersion: '2.1.2',
downloadUrl: 'https://github.com/usenocturne/nocturne-image/releases/latest',
isAccessibleForFree: true,
installUrl: 'https://usenocturne.com/installation',
softwareRequirements: 'Spotify Car Thing, Raspberry Pi, Spotify Premium account',
sameAs: [
'https://wikipedia.org/wiki/Nocturne_(software)',
'https://www.wikidata.org/wiki/Q131441227',
'https://github.com/usenocturne',
],
author: {
'@type': 'Organization',
name: 'Nocturne Team',
url: 'https://usenocturne.com/',
},
license: 'https://opensource.org/licenses/MIT',
}

const jsonLdOrganization = {
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'Nocturne',
url: 'https://usenocturne.com',
logo: 'https://usenocturne.com/images/logo.png',
sameAs: [
'https://wikipedia.org/wiki/Nocturne_(software)',
'https://www.wikidata.org/wiki/Q131441227',
'https://github.com/usenocturne',
'https://discord.gg/GTP9AawHPt'
],
contactPoint: {
'@type': 'ContactPoint',
contactType: 'support',
url: 'https://discord.gg/GTP9AawHPt'
}
}

const jsonLdWebSite = {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Nocturne',
url: 'https://usenocturne.com',
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: 'https://usenocturne.com/search?q={search_term_string}'
},
'query-input': 'required name=search_term_string'
}
}

const jsonLdBreadcrumbList = {
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: [
{
'@type': 'ListItem',
position: 1,
name: 'Home',
item: 'https://usenocturne.com'
},
{
'@type': 'ListItem',
position: 2,
name: 'Installation',
item: 'https://usenocturne.com/installation'
},
{
'@type': 'ListItem',
position: 3,
name: 'Support',
item: 'https://usenocturne.com/support'
}
]
}

export default function RootLayout({
Expand All @@ -38,8 +150,24 @@ export default function RootLayout({
rel="stylesheet"
href="https://api.fontshare.com/css?f%5B%5D=switzer@400,500,600,700&display=swap"
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdSoftware) }}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdOrganization) }}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdWebSite) }}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdBreadcrumbList) }}
/>
</head>
<body className="text-gray-950 antialiased">{children}</body>
</html>
)
}
}

0 comments on commit 73fa0b3

Please sign in to comment.