Skip to content
Snippets Groups Projects
people_chip.html 556 B
{% comment %}
    This page creates a single 'chip' for linking to a person. 
    It expects the username of the person as the 'person' variable
{% endcomment %}

{% capture purl %}/people/{{include.person}}/{% endcapture %}
{% assign pp = site.pages | where: "url", purl | first %}

{% if pp %}
    <a href="{{ site.baseurl }}{{purl}}">
        <div class="chip">
            <img src="{{ site.baseurl }}/{{pp.pic}}"/>
            {{pp.fullname}}
        </div>
    </a>
{% else %}
    <div class="chip">
        {{include.person}}
    </div>
{% endif %}