-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ld+json
metadata to software detail pages
#385
Conversation
This PR generates additional front matter in the detailed software markdown files:
The mkdocs plugin then injects this metadata into the <script type="application/ld+json">{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"applicationCategory": "DeveloperApplication",
"description": "Zstandard is a real-time compression algorithm, providing high compression ratios. It offers a very wide range of compression/speed trade-off, while being backed by a very fast decoder. It also offers a special mode for small data, called dictionary compression, and can create dictionaries from any sample set.",
"license": "Not confirmed",
"name": "zstd",
"offers": {
"@type": "Offer",
"price": 0
},
"operatingSystem": "LINUX",
"review": {
"@type": "Review",
"author": {
"@type": "Organization",
"name": "EESSI"
},
"reviewBody": "Application has been successfully made available on all architectures supported by EESSI",
"reviewRating": {
"@type": "Rating",
"ratingValue": 5
}
},
"softwareRequirements": "See https://www.eessi.io/docs/ for how to make EESSI available on your system",
"softwareVersion": "['zstd/1.5.2-GCCcore-12.2.0', 'zstd/1.5.5-GCCcore-12.3.0', 'zstd/1.5.5-GCCcore-13.2.0']",
"url": "https://facebook.github.io/zstd"
}</script> and this data is successfully parsed by, for example, Google at https://search.google.com/test/rich-results |
return f.read().splitlines() | ||
|
||
setup( | ||
name="inject_ld_json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ocaisa Maybe it makes sense to throw this in a dedicated repo, and publish it on PyPI, so others can also use this plugin, but good enough to park it in our EESSI/docs
repo for now
Fixes #383