Skip to content

Commit

Permalink
Merge pull request #252 from Unibeautify/feature/structured-data-soft…
Browse files Browse the repository at this point in the history
…ware-application

See #246. Add SoftwareApplication structured data to homepage
  • Loading branch information
Glavin001 authored Mar 29, 2020
2 parents 0435860 + 32b3b06 commit 87d1d10
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,45 @@ const Showcase = props => {
);
};

const StructuredData = () => (
<script type="application/ld+json" dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": siteConfig.name,
"description": siteConfig.tagline,
"keywords": `${siteConfig.languages.map(language => language.name + ' code formatter').join(', ')}`,
"creator": {
"@type": "Person",
"name": "Glavin Wiechert",
"url": "https://www.linkedin.com/in/glavin/"
},
"operatingSystem": "Windows, Mac OSX, Linux",
"applicationCategory": "DeveloperApplication",
"installUrl": "https://marketplace.visualstudio.com/items?itemName=Glavin001.unibeautify-vscode",
"featureList": [
`Code formatting for ${siteConfig.languages.length} languages: ${siteConfig.languages.map(language => language.name).join(', ')}`
],
"softwareRequirements": "Atom or Visual Studio Code editors or GitHub code hosting.",
"screenshot": `${siteConfig.url}img/previews/ubi-ci-demo.png`,
"aggregateRating": {
"@type": "AggregateRating",
"itemReviewed": "SoftwareApplication",
"ratingValue": "4.5",
"ratingCount": "8",
"ratingExplanation": "From Unibeautify VSCode extension reviews",
"url": "https://marketplace.visualstudio.com/items?itemName=Glavin001.unibeautify-vscode&ssr=false#review-details"
},
"offers": {
"@type": "Offer",
"price": "0.00",
"priceCurrency": "USD",
}
}, null, 2)
}}>
</script>
);

// ==========================================
// Render page

Expand All @@ -223,6 +262,7 @@ class Index extends React.Component {

return (
<main>
<StructuredData />
<HomeSplash language={language}/>
<div className="mainContainer">
<LanguagesShowcase language={language}/>
Expand Down

0 comments on commit 87d1d10

Please sign in to comment.