diff --git a/_config.yml b/_config.yml index e4e21ca6..db6b231d 100644 --- a/_config.yml +++ b/_config.yml @@ -9,9 +9,6 @@ # cp: Carpentries (to use for instructor traning for instance) carpentry: "cp" -# Overall title for pages. -title: "Lesson Title" - #------------------------------------------------------------ # Generic settings (should not need to change). #------------------------------------------------------------ diff --git a/_data/lesson.yml b/_data/lesson.yml new file mode 100644 index 00000000..e055899e --- /dev/null +++ b/_data/lesson.yml @@ -0,0 +1,25 @@ +# Overall title for pages. +title: "Lesson Title" + +# Metadata +# Here you can add metadata to describe your lesson +# so that people and search engines can understand what it's about. +# Please try to use fields from the Schema.org CreativeWork type - https://schema.org/CreativeWork +description: "This is the template description. Keep me brief (2-3 sentences)" +keywords: # see: https://schema.org/keywords + - GitHub + - Forking + - Collaborative +audience: # see: https://schema.org/audience + - PostDoc students + - Early Career Researchers +license: "https://creativecommons.org/licenses/by/3.0/" # see: schema.org/license +author: # see: https://schema.org/author + - Homer Simpson + - Ned Flanders +contributor: # see: https://schema.org/contributor + - Barney Gumball + - Dr Nick Riviera +timeRequired: "1 hour" # see: https://schema.org/timeRequired +learningResourceType: "lesson plan" # see: https://schema.org/learningResourceType +citation: "How to cite a Training Material, John Smith et al, 2015" # see: https://schema.org/citation diff --git a/_includes/episode_navbar.html b/_includes/episode_navbar.html index ea368eba..f20efa2a 100644 --- a/_includes/episode_navbar.html +++ b/_includes/episode_navbar.html @@ -21,7 +21,7 @@

{% if include.episode_navbar_title %} -

{{ site.title }}

+

{{ site.data.lesson.title }}

{% endif %}
diff --git a/_includes/favicons.html b/_includes/favicons.html index 8a50b4d9..159faad3 100644 --- a/_includes/favicons.html +++ b/_includes/favicons.html @@ -24,7 +24,7 @@ - + diff --git a/_includes/main_title.html b/_includes/main_title.html index b08af4a7..4b5fbded 100644 --- a/_includes/main_title.html +++ b/_includes/main_title.html @@ -4,4 +4,4 @@ {% include base_path.html %} -

{{ site.title }}{% if page.title %}: {{ page.title }}{% endif %}

+

{{ site.data.lesson.title }}{% if page.title %}: {{ page.title }}{% endif %}

diff --git a/_includes/schema_org.html b/_includes/schema_org.html new file mode 100644 index 00000000..6422df45 --- /dev/null +++ b/_includes/schema_org.html @@ -0,0 +1,39 @@ + + diff --git a/_layouts/base.html b/_layouts/base.html index 34959d54..ec98af0d 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -25,7 +25,16 @@ - {{ site.title }}{% if page.title %}: {{ page.title }}{% endif %} + + {% if site.data.lesson %} + {{ site.data.lesson.title }} + {% else %} + {{ site.title }} {% comment %} Fall back for lessons that doesn't have schema_org %{endcomment %} + {% endif %} + {% if page.title %}: + {{ page.title }}{% endif %} + + {% include schema_org.html %} diff --git a/_layouts/lesson.html b/_layouts/lesson.html index f3f7300e..ffacb9fc 100644 --- a/_layouts/lesson.html +++ b/_layouts/lesson.html @@ -2,6 +2,7 @@ layout: base --- {% include main_title.html %} +{% include schema_org.html %}
{{ content }}