-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
94 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Metadata } from "next"; | ||
|
||
import { SEO_DATA } from "./seo-data"; | ||
|
||
interface MetadataInput { | ||
title?: string; | ||
description?: string; | ||
imageUrl?: string; | ||
} | ||
|
||
export function getMetadata(input: MetadataInput = {}): Metadata { | ||
const title = input.title || SEO_DATA.index.title; | ||
const description = input.description || SEO_DATA.index.description; | ||
const imageUrl = input.imageUrl || SEO_DATA.index.imageUrl; | ||
|
||
return { | ||
title, | ||
description, | ||
metadataBase: new URL(SEO_DATA.index.url), | ||
openGraph: { | ||
title: SEO_DATA.index.title, | ||
description: SEO_DATA.index.description, | ||
url: SEO_DATA.index.url, | ||
siteName: "people-work.net", | ||
images: [ | ||
{ | ||
url: imageUrl, | ||
width: 1200, | ||
height: 630, | ||
}, | ||
], | ||
locale: "en-EN", | ||
type: "website", | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
import { BASE_URL } from "./constants"; | ||
|
||
export const SEO_DATA = { | ||
url: BASE_URL, | ||
image: "/opengraph-image.jpg", | ||
title: "Job titles decoded. In a simple Q&A format.", | ||
description: | ||
"A small web hustle on a mission to demystify job titles and show real people behind them.", | ||
|
||
// Person | ||
person: { | ||
index: { | ||
url: BASE_URL, | ||
imageUrl: "/opengraph-image.jpg", | ||
title: "Job titles decoded. In a simple Q&A format.", | ||
description: | ||
"Explore diverse perspectives on this topic from professionals across industries.", | ||
"A small web hustle on a mission to demystify job titles and show real people behind them.", | ||
}, | ||
person: { | ||
title(name: string, title: string, company: string) { | ||
return `${name}, ${title} at ${company}`; | ||
}, | ||
description(name: string) { | ||
return `Discover how ${name} approaches work, perspectives, and career growth. Explore unique insights and experiences in a simple Q&A format.`; | ||
}, | ||
}, | ||
|
||
// Question | ||
question: { | ||
title(question: string) { | ||
return `Q: ${question}`; | ||
}, | ||
description: | ||
"Explore diverse perspectives on this topic from professionals across industries.", | ||
}, | ||
backlog: { | ||
title: "Backlog | Job titles decoded. In a simple Q&A format.", | ||
}, | ||
}; |