Open abotzki opened 2 months ago
For some reasons I don't understand everything that gets inserted before the first heading gets incorrectly html opening, body opening and head tags around it:
<html><head>insert</head><body>
It kind of treats is as it were the first html but there's usually head content above it.
Setting priority to 1 results in:
<div><p><script type="application/ld+json">
{
“@context”: “https://schema.org/”,
“@type”: “LearningResource”,
“@id”: “https://elixir-europe-training.github.io/ELIXIR-TrP-LessonTemplate-MkDocs/”,
“http://purl.org/dc/terms/conformsTo”: {
“@type”: “CreativeWork”,
“@id”: “https://bioschemas.org/profiles/TrainingMaterial/1.0-RELEASE”
},
“description”: “Template for ELIXIR lessons”,
“keywords”: “FAIR, OPEN, Bioinformatics, Teaching”,
“name”: “ELIXIR Training Lesson template”,
“license”: “CC-BY-4.0”,
“author”: [
{
“@type”: “Person”,
“name”: “Geert van Geest”,
“email”: “geert.vangeest@sib.swiss”,
“github”: “GeertvanGeest”,
“orcid”: “0000-0002-1561-078X”
},
{
“@type”: “Person”,
“name”: “Elin Kronander”,
“github”: “elinkronander”,
“orcid”: “0000-0003-0280-6318”
}
]
}
</script></p>
While we expect:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "LearningResource",
"@id": "https://elixir-europe-training.github.io/ELIXIR-TrP-LessonTemplate-MkDocs/",
"http://purl.org/dc/terms/conformsTo": {
"@type": "CreativeWork",
"@id": "https://bioschemas.org/profiles/TrainingMaterial/1.0-RELEASE"
},
"description": "Template for ELIXIR lessons",
"keywords": "FAIR, OPEN, Bioinformatics, Teaching",
"name": "ELIXIR Training Lesson template",
"license": "CC-BY-4.0",
"author": [
{
"@type": "Person",
"name": "Geert van Geest",
"email": "geert.vangeest@sib.swiss",
"github": "GeertvanGeest",
"orcid": "0000-0002-1561-078X"
},
{
"@type": "Person",
"name": "Elin Kronander",
"github": "elinkronander",
"orcid": "0000-0003-0280-6318"
}
]
}
</script>
BTW: quick fix would be adding the bioschemas insert after any markdown, so e.g.:
# ELIXIR Lesson Title
[add-bioschemas file='./docs/training-material.yaml']
It seems to be a mkdocs-material issue. Everything works as expected with mkdocs.
We might be able to fix it with a postprocessor. However, in that case it is only possible to add one json-LD to a page. I think this covers most (if not all) use-cases.
for an example see the documentation at
https://github.com/elixir-europe-training/ELIXIR-TrP-Bioschemas/issues/1