Skip to content

Commit 3ceb871

Browse files
feat: Enhance SEO metadata with structured data and update the project PDF.
1 parent dcdb781 commit 3ceb871

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎public/yourselftoscience.pdf‎

0 Bytes
Binary file not shown.

‎src/app/layout.tsx‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ const currentYear = new Date().getFullYear();
3232
// This export is necessary to prevent a build error.
3333
// See: https://github.com/vercel/next.js/issues/53354
3434
export const metadata: Metadata = {
35-
title: "Yourself to Science",
35+
title: {
36+
default: "Yourself to Science",
37+
template: "%s | Yourself to Science",
38+
},
3639
description: "A Comprehensive Open-Source List of Services for Contributing to Science with Your Data, Genome, Body, and More",
3740
icons: {
3841
icon: [
@@ -90,6 +93,18 @@ export default function RootLayout({
9093
}: {
9194
children: React.ReactNode;
9295
}) {
96+
const jsonLd = {
97+
"@context": "https://schema.org",
98+
"@type": "WebSite",
99+
"name": "Yourself to Science",
100+
"url": "https://yourselftoscience.org",
101+
"potentialAction": {
102+
"@type": "SearchAction",
103+
"target": "https://yourselftoscience.org/?q={search_term_string}",
104+
"query-input": "required name=search_term_string"
105+
}
106+
};
107+
93108
return (
94109
// Keep suppressHydrationWarning on html for good measure
95110
<html lang="en" suppressHydrationWarning={true}>
@@ -105,6 +120,10 @@ export default function RootLayout({
105120
{/* Add other necessary head elements like charset, viewport */}
106121
<meta charSet="utf-8" />
107122
<meta name="viewport" content="width=device-width, initial-scale=1" />
123+
<script
124+
type="application/ld+json"
125+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
126+
/>
108127
{/* Umami Analytics via same-origin proxy */}
109128
<script
110129
defer

0 commit comments

Comments
 (0)