A Sphinx extension to embed Bioschemas profiles or any Schema.org structured metadata into your Sphinx documentation as <script type="application/ld+json"> tags.
- Supports YAML and JSON formats
- Embed metadata inline or load from an external file
- Apply markup per-page (via directive) or globally for all pages (via
conf.py) - Works with MyST for Markdown-based Sphinx projects
$ pip install sphinx-bioschemasThen enable the extension in your conf.py:
extensions = ['sphinx_bioschemas']
Per-page (in a .rst file):
.. bioschemas:: :format: yaml "@context": https://schema.org/ "@type": LearningResource name: My Tutorial ...Or load from a file:
.. bioschemas:: bioschemas.yamlGlobal (in conf.py):
bioschemas = ["bioschemas.yaml"]