Skip to content
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

Merged
merged 6 commits into from
Feb 20, 2025
Merged

Conversation

ocaisa
Copy link
Member

@ocaisa ocaisa commented Feb 19, 2025

Fixes #383

@ocaisa
Copy link
Member Author

ocaisa commented Feb 20, 2025

This PR generates additional front matter in the detailed software markdown files:

---
hide:
- toc
json_ld:
  '@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
---

zstd
====


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.

https://facebook.github.io/zstd
# Available modules


The overview below shows which zstd installations are available per target architecture in EESSI, ordered based on software version (new to old).

To start using zstd, load one of these modules using a `module load` command like:

...

The mkdocs plugin then injects this metadata into the <head> of the rendered pages:

<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",
Copy link
Contributor

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

@boegel boegel merged commit f6517a3 into EESSI:main Feb 20, 2025
3 checks passed
@ocaisa ocaisa deleted the schema branch February 20, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We can make EESSI more FAIR by adding schema.org metadata to our <head>
2 participants