Skip to content

Commit

Permalink
refactor json-ld
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorocha committed Dec 22, 2023
1 parent 0b03c76 commit c55ecb5
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 112 deletions.
113 changes: 113 additions & 0 deletions lib/json-ld.js
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]
}
}
116 changes: 4 additions & 112 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 (
<Wrapper>
<Head>
Expand All @@ -141,7 +31,9 @@ export default function Index(props) {
<meta content={`https://zenorocha.com${image}`} property="og:image" />
<script
type="application/ld+json"
dangerouslySetInnerHTML={getPersonJsonLd()}
dangerouslySetInnerHTML={{
__html: JSON.stringify(getPersonJsonLd())
}}
key="person-jsonld"
/>
</Head>
Expand Down

1 comment on commit c55ecb5

@vercel
Copy link

@vercel vercel bot commented on c55ecb5 Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.