From cbb6972da70f28c09e3d9d14f5490d90a96b0991 Mon Sep 17 00:00:00 2001 From: tvluke <tvluke@chaotikum.org> Date: Thu, 4 Jan 2024 13:12:10 +0100 Subject: [PATCH] optimizing --- media_ext.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/media_ext.xml b/media_ext.xml index 8ab6e42a..22b3b6f7 100644 --- a/media_ext.xml +++ b/media_ext.xml @@ -10,6 +10,8 @@ layout: null {% for video in sorted %} {% capture releasedate %}{{video.release_date | date: '%s'}}{% endcapture %} + {% assign whitespace = " " %} + {% assign optout = false -%} {% if video.optout and video.optout != '' -%} {% assign optout = true -%} @@ -25,6 +27,10 @@ layout: null {% endfor -%} {% endcapture -%} + {% capture persons3 -%} +{{whitespace}} von {{persons2}} + {% endcapture -%} + {% if video.event and video.event != '' -%} {% for e in site.events -%} {% if e.uid == video.event -%} @@ -57,7 +63,7 @@ layout: null {% endif -%} {% endfor -%} {% endfor -%} -<title>{% if video.persons and name_before_title -%}{{persons}}: {% endif -%}{{video.title| xml_escape }}{% for conf in video.conferences -%}{% for c in site.conferences -%}{% if conf == c.acronym -%}{% if c.ecki -%}[{{c.title| xml_escape}}]{% endif -%}{% endif -%}{% endfor -%}{% endfor -%}{% if video.persons and name_after_title -%} von {{persons2}} {% endif -%}</title> +<title>{% if video.persons and name_before_title -%}{{persons| strip}}: {% endif -%}{{video.title| xml_escape }}{% for conf in video.conferences -%}{% for c in site.conferences -%}{% if conf == c.acronym -%}{% if c.ecki -%}{{whitespace}}[{{c.title| xml_escape}}]{% endif -%}{% endif -%}{% endfor -%}{% endfor -%}{% if video.persons and name_after_title %}{{whitespace}}{{persons3| strip}}{% endif -%}</title> {% capture ccontent %}{{video.content | strip_html | xml_escape }}{% endcapture -%} {% if ccontent and ccontent != '' -%} <description>{{ccontent}} 
{% for conf in video.conferences %}{% for c in site.conferences -%}{% if conf == c.acronym and c.content != '' -%}{{c.content | strip_html | xml_escape }} 
{% endif -%}{% endfor -%}{% endfor %}{% if video.licence and video.licence != '' -%}{{video.licence | strip_html | xml_escape }}{% else -%}This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (CC BY NC ND 4.0). https://creativecommons.org/licenses/by-nc-nd/4.0/{% endif -%}</description> @@ -65,7 +71,7 @@ layout: null <recDate>{{ recording_date | date: '%Y-%m-%d' }}</recDate> <pubDate>{{ video.date | date: '%Y-%m-%d' }}</pubDate> <license>{{video.licence}}</license> - <persons>{{persons}}</persons> + <persons>{{persons| strip}}</persons> {% if video.language and video.language != '' -%} <language>{{video.language}}</language> {% else -%} -- GitLab