diff --git a/app/templates/common/base_main.html b/app/templates/common/base_main.html index 5da61df8..d20f2e05 100644 --- a/app/templates/common/base_main.html +++ b/app/templates/common/base_main.html @@ -2,17 +2,25 @@ - + - + + + + + + + - - - - + + + + {% endblock %} {% block styles %} diff --git a/app/templates/dataset.html b/app/templates/dataset.html index 1c144d45..914ebfc3 100644 --- a/app/templates/dataset.html +++ b/app/templates/dataset.html @@ -1,9 +1,13 @@ {% extends 'common/base_main.html' %} {% block head %} {{ super() }} -CONP Portal | Dataset +CONP Portal | {{ data.title if data.title else 'Dataset' }} {% endblock %} +{% block og_title %}{{ data.title if data.title else 'Dataset' }} | CONP Portal{% endblock %} +{% block og_description %}{% if metadata.description %}{{ metadata.description | striptags | truncate(200) }}{% else %}A dataset on the Canadian Open Neuroscience Platform (CONP) Portal.{% endif %}{% endblock %} +{% block og_url %}https://portal.conp.ca/dataset?id={{ data.id }}{% endblock %} + {% block scripts %} {{ super() }} diff --git a/app/templates/experiments/experiment.html b/app/templates/experiments/experiment.html index eff4b8fa..2f02ba19 100644 --- a/app/templates/experiments/experiment.html +++ b/app/templates/experiments/experiment.html @@ -4,6 +4,9 @@ CONP Portal | {{ experiment.title }} {% endblock %} +{% block og_title %}{{ experiment.title }} | CONP Portal{% endblock %} +{% block og_description %}{% if experiment.description is defined and experiment.description %}{{ experiment.description | striptags | truncate(200) }}{% else %}An experiment on the Canadian Open Neuroscience Platform (CONP) Portal.{% endif %}{% endblock %} + {% block contenttitle %}

CONP Portal | {{ experiment.title }}

{% endblock %} {% block appcontent %} diff --git a/app/templates/pipeline.html b/app/templates/pipeline.html index c2862d3f..c0f28bee 100644 --- a/app/templates/pipeline.html +++ b/app/templates/pipeline.html @@ -4,6 +4,9 @@ CONP Portal | {{ pipeline.title }} {% endblock %} +{% block og_title %}{{ pipeline.title }} | CONP Portal{% endblock %} +{% block og_description %}{% if pipeline.description is defined and pipeline.description|length %}{{ pipeline.description | striptags | truncate(200) }}{% else %}An analysis tool or pipeline on the Canadian Open Neuroscience Platform (CONP) Portal.{% endif %}{% endblock %} + {% block scripts %} {{ super() }}