From ff8e2c0910ebe9fd1a953971b7325b1a47e39b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20M=C3=A9nager?= <herve.menager@pasteur.fr> Date: Mon, 4 May 2020 18:29:22 +0200 Subject: [PATCH] add schema.org/bioschemas markup to compound cards --- ippisite/ippidb/templates/compound_card.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ippisite/ippidb/templates/compound_card.html b/ippisite/ippidb/templates/compound_card.html index 3e0bb5c2..2ad8e23e 100644 --- a/ippisite/ippidb/templates/compound_card.html +++ b/ippisite/ippidb/templates/compound_card.html @@ -468,6 +468,24 @@ </div> </div> +<script id='JSON_LD' type="application/ld+json"> + + { +"url": "{{ compound.get_absolute_url }}", +"inChI": "{{ compound.inchi }}", +"iupacName": "{{ compound.iupac_name }}", +"molecularWeight": {{ compound.molecular_weight }}, +"identifier": "{{ compound.id }}", +"inChIKey": "{{ compound.inchi }}", +"@type": "MolecularEntity", +"image": "https://www.ebi.ac.uk/chembl/api/data/image/CHEMBL3623057.svg", +"smiles": [ + "{{ compound.canonical_smile }}" +], +"@context": "http://schema.org" +} + +</script> <script> var showTab = function (hash) { window.location.hash = hash; -- GitLab