You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2022. It is now read-only.
If the list matches the names of the team members it takes the real name from the team members and adds it as markup.
Two things I didn't anticipate when writing this.
What happens when the name does not match?
What happens if a Team member leaves the team?
For 1. we can just write the actual name and insert it leaving out the <a hef=""></a> tag.
For 2. I guess it would be nice to have a list of alumnis we can link to.
So my suggestion is creating a new collection called _alumni with the following data
We make no EN/DE difference and if we don't find a team member with that ID we also look up in the alumni collection. If still don't find anyone there we just use the text that was added in there.
Instead of running two loops it might be better to merge the two collections (team_(en/de) + alumni). Merging those objects seems not to be possible in liquid. The snippet below takes another approach. The variable site.documents holds all collections, pages, posts etc. We only have to filter for those we want
This snippet should get you started (should you choose to accept this mission)
{% foriteminsite.documents %}
<!-- we build the collection name based on the pages variables -->
{% assignteam_collection_name = "team_" | append:page.lang %}
<!-- we filter for only the ones in the wanted collections -->
{% ifitem.collection==team_collection_nameoritem.collection=='alumni' %}
<!--{{ item | jsonify }} --><!-- dont use the term "url" for storing the link to a alumni. The property url odes exists on all of the documents -->
{{ item.name }}
{% endif %}
{% endfor %}
The text was updated successfully, but these errors were encountered:
@dnsos I can take this one, but I thought it might be a good point for you to get familiar with liquid templating logic.
The snippet that does the name lookup in all the team members is this one
lab-site/source/_includes/project-header.html
Lines 50 to 61 in 695010d
We add to the frontmatter of a page a list of authors
like this one https://github.com/technologiestiftung/lab-site/blob/master/source/projects/fisbroker-to-qgis/de/index.md#L16-L17
If the list matches the names of the team members it takes the real name from the team members and adds it as markup.
Two things I didn't anticipate when writing this.
For 1. we can just write the actual name and insert it leaving out the
<a hef=""></a>
tag.For 2. I guess it would be nice to have a list of alumnis we can link to.
So my suggestion is creating a new collection called
_alumni
with the following dataWe make no EN/DE difference and if we don't find a team member with that ID we also look up in the alumni collection. If still don't find anyone there we just use the text that was added in there.
Instead of running two loops it might be better to merge the two collections (team_(en/de) + alumni).Merging those objects seems not to be possible in liquid. The snippet below takes another approach. The variablesite.documents
holds all collections, pages, posts etc. We only have to filter for those we wantThis snippet should get you started (should you choose to accept this mission)
The text was updated successfully, but these errors were encountered: