tilde-site/templates/macros/authors.html

15 lines
515 B
HTML
Raw Normal View History

2023-01-25 08:55:24 +00:00
{#
# I assume we get an array of author names. in the variable `authors`
#}
{% macro authors_inline(authors) %}
{% set authors_infos = load_data(path="authors.yaml") %}
{% for author in authors %}
{% for author_infos in authors_infos.authors %}
{% if author_infos.name == author %}
{% set_global author = author_infos %}
{% endif %}
{% endfor %}
<span class="h-card u-author"><a class="u-url p-name" href="{{ author.url }}">{{ author.name }}</a></span>
{% endfor %}
{% endmacro %}