So, because the vignettes are generated differently than Markdown on GitHub, I had to find the right hooks. In the end, I found these in one vignette adding a Google Analytics tracker in the header of the file. Bingo!
![]() |
| Screenshot of Google's Structured Data Testing Tool. |
The HTML snippet (saved as bioschemas.html) to add is basically a <script> element with a fragment of JSON-LD:
<script type="application/ld+json">
{
"@context":"http://schema.org/",
"@type":"CreativeWork",
"about":"This tutorial describes how to use the BridgeDbR package for identifier mapping.",
"audience":[
"http://edamontology.org/topic_3070",
"http://edamontology.org/topic_3314"
],
"genre":[
"http://edamontology.org/topic_0605",
"http://edamontology.org/operation_3282",
"http://edamontology.org/data_1025",
"http://edamontology.org/data_0982"
],
"name":"BridgeDbR Tutorial",
"author":[{
"@type":"Person",
"name":"Egon Willighagen",
"identifier":"0000-0001-7542-0286"
}],
"difficultyLevel": "beginner",
"keywords":"ELIXIR RIR, BridgeDb",
"license":"AGPL-3",
"url":[
"https://bioconductor.org/packages/devel/bioc/vignettes/BridgeDbR/inst/doc/tutorial.html"
],
"version":"1.17.4"
}
</script>
The other half of the story is to instruct the HTML generation pipeline to add it, which is done with this bit of YAML in your Markdown file (part of it you should already have):
output:
BiocStyle::html_document:
toc_float: true
includes:
in_header: bioschemas.html
Check the full folder here.

No comments:
Post a Comment