feat: harden portfolio and add SEO foundations
This commit is contained in:
1 parent
b079afdd73
commit
62bcfbd8fa
121 files changed
+7769
-10469
No files matched your search
+83
@@ -0,0 +1,83 @@
|
||||
import { type ServicePageContent, siteName, siteUrl } from "./site-content";
|
||||
|
||||
export const SEO_IDS = {
|
||||
website: `${siteUrl}/#website`,
|
||||
person: `${siteUrl}/#person`,
|
||||
profilePage: `${siteUrl}/curriculo#profile-page`,
|
||||
} as const;
|
||||
|
||||
export function buildWebSiteJsonLd() {
|
||||
return {
|
||||
"@type": "WebSite",
|
||||
"@id": SEO_IDS.website,
|
||||
url: siteUrl,
|
||||
name: siteName,
|
||||
inLanguage: "pt-BR",
|
||||
publisher: { "@id": SEO_IDS.person },
|
||||
} as const;
|
||||
}
|
||||
|
||||
export function buildPersonJsonLd() {
|
||||
return {
|
||||
"@type": "Person",
|
||||
"@id": SEO_IDS.person,
|
||||
name: "Evandro Fonseca Junior",
|
||||
url: siteUrl,
|
||||
image: `${siteUrl}/edev.jpg`,
|
||||
homeLocation: {
|
||||
"@type": "Place",
|
||||
name: "Garuva, Santa Catarina, Brasil",
|
||||
},
|
||||
sameAs: [
|
||||
"https://github.com/evandrodevbr",
|
||||
"https://www.linkedin.com/in/evandro-fonseca-junior-0969aa1b0/",
|
||||
],
|
||||
} as const;
|
||||
}
|
||||
|
||||
export function buildProfilePageJsonLd() {
|
||||
return {
|
||||
"@type": "ProfilePage",
|
||||
"@id": SEO_IDS.profilePage,
|
||||
url: `${siteUrl}/curriculo`,
|
||||
inLanguage: "pt-BR",
|
||||
isPartOf: { "@id": SEO_IDS.website },
|
||||
mainEntity: { "@id": SEO_IDS.person },
|
||||
} as const;
|
||||
}
|
||||
|
||||
export function buildServiceJsonLd(service: ServicePageContent) {
|
||||
const pageUrl = `${siteUrl}/servicos/${service.slug}`;
|
||||
|
||||
return {
|
||||
"@type": "Service",
|
||||
"@id": `${pageUrl}#service`,
|
||||
url: pageUrl,
|
||||
name: service.navLabel,
|
||||
description: service.metaDescription,
|
||||
provider: { "@id": SEO_IDS.person },
|
||||
areaServed: [
|
||||
{ "@type": "City", name: "Garuva" },
|
||||
{
|
||||
"@type": "AdministrativeArea",
|
||||
name: "Norte de Santa Catarina",
|
||||
},
|
||||
],
|
||||
} as const;
|
||||
}
|
||||
|
||||
export function buildBreadcrumbList(
|
||||
pageUrl: string,
|
||||
items: readonly (readonly [name: string, url: string])[],
|
||||
) {
|
||||
return {
|
||||
"@type": "BreadcrumbList",
|
||||
"@id": `${pageUrl}#breadcrumb`,
|
||||
itemListElement: items.map(([name, item], index) => ({
|
||||
"@type": "ListItem" as const,
|
||||
position: index + 1,
|
||||
name,
|
||||
item,
|
||||
})),
|
||||
} as const;
|
||||
}
|
||||
Reference in new issue
Block a user