{%- capture nowunix %}{{'now' | date: '%s'}}{% endcapture -%} {% assign projectArray = "" | split: ',' -%} {% assign projectTags = "" | split: ',' -%} {% for project in site.projects -%} {% assign projectTags = projectTags | push: project.tag -%} {% endfor -%} {% comment -%} Step one: Check if the Project has a date field, which is probably when it started... or at least some baseline {% endcomment -%} {% for project in site.projects -%} {% if project.start_date -%} {% capture lastUpdate %}{{ project.start_date | date: '%s' }}{% endcapture -%} {% if lastUpdate < nowunix -%} {% capture px %}{{lastUpdate}}⛟{{project.tag}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endif -%} {% endfor -%} {% comment -%} Step two: some projects may have a field lastupdate, if thats higher than the date alread found, letzts replace it {% endcomment -%} {% for project in site.projects -%} {% if project.last_update -%} {% capture lastUpdate %}{{ project.last_update | date: '%s' }}{% endcapture -%} {% if lastUpdate < nowunix -%} {% capture px %}{{lastUpdate}}⛟{{project.tag}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endif -%} {% endfor -%} {% comment -%} Step three: find blog posts {% endcomment -%} {% assign relevant_posts = site.posts | where_exp: "rpost", "rpost.categories contains 'project'" -%} {% assign posts = relevant_posts | sort: 'date' -%} {% for post in posts reversed %} {% if post.categories contains 'project' -%} {% capture lastUpdate %}{{ post.date | date: '%s' }}{% endcapture -%} {% if lastUpdate < nowunix -%} {% for tag in post.tags -%} {% if projectTags contains tag -%} {% capture px %}{{lastUpdate}}⛟{{tag}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endfor -%} {% endif -%} {% endif -%} {% endfor -%} {% comment -%} Step four: Media files {% endcomment -%} {% for media in site.media -%} {% for me_pr in media.projects -%} {% if projectTags contains me_pr -%} {% if video.release_date and video.release_date != '' %} {% capture lastUpdate %}{{ media.release_date | date: '%s' }}{% endcapture -%} {% else -%} {% if video.event and video.event != ''-%} {% for event in site.events -%} {% if event.uid == video.event -%} {% capture lastUpdate %}{{ event.eventdate | date: '%s' }}{% endcapture -%} {% endif -%} {% endfor -%} {% endif -%} {% endif -%} {% if lastUpdate < nowunix -%} {% capture px %}{{lastUpdate}}⛟{{me_pr}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endif -%} {% endfor -%} {% endfor -%} {% comment -%} Step five: Events {% endcomment -%} {% for event in site.events -%} {% for ev_pr in event.projects -%} {% if projectTags contains ev_pr -%} {% capture lastUpdate %}{{ event.eventdate | date: '%s' }}{% endcapture -%} {% if lastUpdate < nowunix -%} {% capture px %}{{lastUpdate}}⛟{{ev_pr}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endif -%} {% endfor -%} {% endfor -%} {% comment -%} Step six: Loans and Bookings {% endcomment -%} {% for loan in site.loan %} {% for lo_pr in loan.projects %} {% if projectTags contains lo_pr -%} {% capture lastUpdate %}{{ loan.eventdate | date: '%s' }}{% endcapture -%} {% if lastUpdate < nowunix -%} {% capture px %}{{lastUpdate}}⛟{{lo_pr}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endif -%} {% endfor -%} {% endfor -%} {% comment -%} Step seven: Pressespiegel {% endcomment -%} {% for press in site.press reversed %} {% for pr_pr in press.projects %} {% if projectTags contains pr_pr -%} {% capture lastUpdate %}{{ press.date | date: '%s' }}{% endcapture -%} {% if lastUpdate < nowunix -%} {% capture px %}{{lastUpdate}}⛟{{pr_pr}}{% endcapture -%} {% assign projectArray = projectArray | push: px -%} {% endif -%} {% endif -%} {% endfor -%} {% endfor -%} {% assign projectsPrinted = "" | split: ',' -%} {% for project in site.projects -%} {% for p in projectArray reversed %} {% assign p_tag = p | split: '⛟' | last -%} {% assign p_date = p | split: '⛟' | first -%} {% if p_tag == project.tag -%} {% if projectsPrinted contains p_tag -%} {% else -%} {% assign projectsPrinted = projectsPrinted | push: p_tag -%}

    {{ project.name | markdownify | remove: '

    ' | remove: '

    ' }}

    {% if project.image -%} {% if project.image contains '://' -%}
    {% else -%}
    {% endif -%} {% endif -%} Letztes Update: {{p_date | date: '%Y-%m-%d'}} {{ project.excerpt | strip_html | markdownify | truncatewords: 60 }}
    {% endif -%} {% endif -%} {% endfor -%} {% endfor -%}