From c55ecb57e92e94c9c84408beafc3f8dc63669a3b Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Fri, 22 Dec 2023 10:41:53 -0300 Subject: [PATCH] refactor json-ld --- lib/json-ld.js | 113 +++++++++++++++++++++++++++++++++++++++++++++++ pages/index.js | 116 ++----------------------------------------------- 2 files changed, 117 insertions(+), 112 deletions(-) create mode 100644 lib/json-ld.js diff --git a/lib/json-ld.js b/lib/json-ld.js new file mode 100644 index 00000000..ecc3094f --- /dev/null +++ b/lib/json-ld.js @@ -0,0 +1,113 @@ +export const getPersonJsonLd = () => { + return { + "@context": "https://schema.org/", + "@type": "Person", + "url": "https://zenorocha.com/", + "affiliation": [ + { + "@type": "Organization", + "@id": "https://www.wikidata.org/wiki/Q123921042", + "url": "https://resend.com/", + "name": "Resend" + }, + { + "@type": "Organization", + "@id": "https://www.wikidata.org/wiki/Q2616400", + "url": "https://www.ycombinator.com/", + "name": "Y Combinator" + } + ], + "description": "Zeno Rocha is a Brazilian software entrepreneur who is the founder and CEO of Resend. Before founding Resend, Zeno was a VP of Developer Experience at WorkOS.", + "image": "https://upload.wikimedia.org/wikipedia/commons/9/90/Zeno_Rocha.png", + "name": "Zeno Rocha", + "givenName": "Zeno", + "familyName": "Rocha", + "gender": "Male", + "birthPlace": "Curitiba", + "jobTitle": "Founder and CEO", + "sameAs": [ + "https://www.wikidata.org/wiki/Q123921198", + "https://g.co/kgs/n7UTfw", + "https://www.linkedin.com/in/zenorocha", + "https://twitter.com/zenorocha", + "https://www.crunchbase.com/person/zeno-rocha", + "https://www.reddit.com/user/zenorocha", + "https://www.instagram.com/zenorocha", + "https://github.com/zenorocha", + "https://golden.com/wiki/Zeno_Rocha-GZ93NP9", + "https://www.smashingmagazine.com/author/zeno-rocha/", + "https://www.amazon.com/stores/Zeno-Rocha/author/B08C4PL3H6", + "https://www.ycombinator.com/companies/founders?query=Zeno%20Rocha" + ], + "knowsAbout": [ + { + "@type": "Organization", + "@id": "https://www.wikidata.org/wiki/Q123921042", + "name": "Resend" + }, + { + "@type": "Thing", + "@id": "https://www.wikidata.org/wiki/Q80993", + "name": "Software Engineering" + }, + { + "@type": "Thing", + "@id": "https://www.wikidata.org/wiki/Q1254596", + "name": "Software as a Service" + }, + { + "@type": "Organization", + "@id": "https://www.wikidata.org/wiki/Q2616400", + "name": "Y Combinator" + } + ], + "knowsLanguage": [ + { + "@type": "Language", + "@id": "https://www.wikidata.org/wiki/Q750553", + "name": "Brazilian Portuguese" + }, + { + "@type": "Language", + "@id": "https://www.wikidata.org/wiki/Q1860", + "name": "English" + } + ], + "nationality": [ + { + "@type": "Country", + "@id": "https://www.wikidata.org/wiki/Q155", + "name": "Brazil" + }, + { + "@type": "Country", + "@id": "https://www.wikidata.org/wiki/Q30", + "name": "United States of America" + } + ], + "alumniOf": [ + { + "@type": "EducationalOrganization", + "@id": "https://www.wikidata.org/wiki/Q2616400", + "name": "Y Combinator", + "url": "https://www.ycombinator.com/", + "startDate": "2023", + "endDate": "2023" + }, + { + "@type": "EducationalOrganization", + "@id": "https://www.wikidata.org/wiki/Q3011938", + "name": "Federal University of the State of Rio de Janeiro", + "url": "https://www.unirio.br/", + "startDate": "2009", + "endDate": "2013", + "major": [ + { + "@type": "DefinedTerm", + "name": "Information Systems" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index 3cf99433..5c6ec932 100644 --- a/pages/index.js +++ b/pages/index.js @@ -5,6 +5,7 @@ import Footer from '../components/Footer' import ShortcutHome from '../components/ShortcutHome' import { PostMain, PostContent, PostContainer } from '../components/Post' import { Wrapper } from '../components/Wrapper' +import { getPersonJsonLd } from '../lib/json-ld' export async function getStaticProps() { return { @@ -19,117 +20,6 @@ export async function getStaticProps() { export default function Index(props) { const { title, description, image } = props - const getPersonJsonLd = () => { - return { - __html: `{ - "@context": "https://schema.org/", - "@type": "Person", - "url": "https://zenorocha.com/", - "affiliation": [ - { - "@type": "Organization", - "@id": "https://www.wikidata.org/wiki/Q123921042", - "url": "https://resend.com/", - "name": "Resend" - }, - { - "@type": "Organization", - "@id": "https://www.wikidata.org/wiki/Q2616400", - "url": "https://www.ycombinator.com/", - "name": "Y Combinator" - } - ], - "description": "Zeno Rocha is a Brazilian software entrepreneur who is the founder and CEO of Resend. Before founding Resend, Zeno was a VP of Developer Experience at WorkOS.", - "image": "https://upload.wikimedia.org/wikipedia/commons/9/90/Zeno_Rocha.png", - "name": "Zeno Rocha", - "givenName": "Zeno", - "familyName": "Rocha", - "gender": "Male", - "birthPlace": "Curitiba", - "jobTitle": "Founder and CEO", - "sameAs": [ - "https://www.wikidata.org/wiki/Q123921198", - "https://www.linkedin.com/in/zenorocha", - "https://twitter.com/zenorocha", - "https://www.crunchbase.com/person/zeno-rocha", - "https://www.reddit.com/user/zenorocha", - "https://www.instagram.com/zenorocha", - "https://github.com/zenorocha" - ], - "knowsAbout": [ - { - "@type": "Organization", - "@id": "https://www.wikidata.org/wiki/Q123921042", - "name": "Resend" - }, - { - "@type": "Thing", - "@id": "https://www.wikidata.org/wiki/Q80993", - "name": "Software Engineering" - }, - { - "@type": "Thing", - "@id": "https://www.wikidata.org/wiki/Q1254596", - "name": "Software as a Service" - }, - { - "@type": "Organization", - "@id": "https://www.wikidata.org/wiki/Q2616400", - "name": "Y Combinator" - } - ], - "knowsLanguage": [ - { - "@type": "Language", - "@id": "https://www.wikidata.org/wiki/Q750553", - "name": "Brazilian Portuguese" - }, - { - "@type": "Language", - "@id": "https://www.wikidata.org/wiki/Q1860", - "name": "English" - } - ], - "nationality": [ - { - "@type": "Country", - "@id": "https://www.wikidata.org/wiki/Q155", - "name": "Brazil" - }, - { - "@type": "Country", - "@id": "https://www.wikidata.org/wiki/Q30", - "name": "United States of America" - } - ], - "alumniOf": [ - { - "@type": "EducationalOrganization", - "@id": "https://www.wikidata.org/wiki/Q2616400", - "name": "Y Combinator", - "url": "https://www.ycombinator.com/", - "startDate": "2023", - "endDate": "2023" - }, - { - "@type": "EducationalOrganization", - "@id": "https://www.wikidata.org/wiki/Q3011938", - "name": "Federal University of the State of Rio de Janeiro", - "url": "https://www.unirio.br/", - "startDate": "2009", - "endDate": "2013", - "major": [ - { - "@type": "DefinedTerm", - "name": "Information Systems" - } - ] - } - ] - }`, - }; - } - return ( @@ -141,7 +31,9 @@ export default function Index(props) {