fixed a few issues including the issue of broken resource landing page
{% endblock %}
{% endif %}
-{% if not page|is_debug %}
+{# {% if not page|is_debug %} #}
{# ======= JSON-LD Structure ======= #}
<script type="application/ld+json">
{
"@vocab": "http://www.schema.org/",
"datacite": "http://purl.org/spar/datacite/"
},
-
{% if cm.raccess.published %}
"@id": "https://doi.org/10.4211/hs.{{ cm.short_id }}",
"sameAs": "https://www.hydroshare.org/resource/{{ cm.short_id }}",
{% endif %}
},
"creator": [
- {% for cr in creators %}
- {
- {% if cr.email %}
- "email": "{{ cr.email }}",
- {% endif %}
+ {% for cr in creators %} {
+ {% if cr.email %}"email": "{{ cr.email }}",{% endif %}
{% if cr.address %}
"address": {
"@type": "PostalAddress",
{% if cr.name %}
"@type": "Person",
"name": "{{ cr.name }}",
+ {% if cr.organization %}
"affiliation": {
"@type": "Organization",
"name": "{{ cr.organization }}"
},
+ {% endif %}
{% if cr.identifiers %}
"url": [
"https://www.hydroshare.org{{ cr.description }}",
- {% for key, val in cr.identifiers %}
- "{{ value }}"
- {%if not forloop.last%},{%endif%}
- {% endfor %}
+ {% for key, val in cr.identifiers.items %}"{{ val }}"{%if not forloop.last%},{%endif%}{% endfor %}
]
- {% else %}
- "url", "https://www.hydroshare.org{{ cr.description }}"
- {% endif %}
+ {% elif cr.description %}"url": "https://www.hydroshare.org{{ cr.description }}"{% endif %}
{% else %}
"@type": "Organization",
"name": "{{ cr.organization }}",
}
}
</script>
-{% endif %}
+{# {% endif %} #}
