Commit c817b022 authored by Erxleben, Fredo's avatar Erxleben, Fredo Committed by Erxleben, Fredo
Browse files

Streamline blogpost OG generation

Also fix a tiny wrong `<` that moved the blogpost OG tags in the body.
parent 3a6e0cf5
Pipeline #17585 passed with stages
in 6 minutes
<{% comment %}
{% comment %}
This is open graph protocol metadata for blog post page layout.
Instead of the id of the team member the full name is retrieved and
added as author name of the blog post.
{% endcomment %}
{% comment %}
Initialize array with no element out of empty string by splitting
according to split-character not contained in given string.
{% endcomment %}
{% assign authors = '' | split: '' %}
{% for author in page.authors %}
{% for member in site.data.hifis_team %}
{% if author == member['id'] %}
{% comment %}
Create array with one element out of string by splitting
according to split-character not contained in given string.
{% endcomment %}
{% assign full_name =
site.data.hifis_team[forloop.index0]['name'] | split: '@' %}
{% assign authors = authors | concat: full_name %}
{% break %}
{% endif %}
{% endfor %}
{% endfor %}
<meta property="og:title"
content="HIFIS Software Services - Blog Post '{{ page.title }}'" />
<meta property="og:description"
content="{{ page.excerpt | strip_html }}" />
<meta property="og:title"
content="HIFIS Software Services - Blog Post '{{ page.title }}'" />
<meta property="og:description"
content="{{ page.excerpt | strip_html }}" />
<meta property="og:type" content="article" />
<meta property="article:published_time"
content="{{ page.date | date: '%A, %d %B %Y' }}" />
{% for author in authors %}
<meta property="article:author" content="{{ author }}" />
<meta property="og:type"
content="article" />
<meta property="article:published_time"
content="{{ page.date | date: '%A, %d %B %Y' }}" />
{% for author_id in page.authors %}
{% assign person_entry = site.data.hifis_team | where: "id", author_id %}
{% assign person = person_entry[0] %}
{% if person.name %}
<meta property="article:author"
content="{{ person.title }}{{ person.name }}" />
{% else %}
<meta property="article:author"
content="{{ author_id }}" />
{% endif %}
{% endfor %}
<meta property="article:section" content="{{ page.title }}" />
<meta property="article:section"
content="{{ page.title }}" />
{% for tag in page.tags %}
<meta property="article:tag" content="{{ tag }}" />
<meta property="article:tag"
content="{{ tag }}" />
{% endfor %}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment