newsroom refactor to support people taxonomy

This commit is contained in:
timurgordon
2022-07-27 16:01:02 +02:00
parent 22b411e7c2
commit 2faba61581
3 changed files with 30 additions and 22 deletions

View File

@@ -12,17 +12,19 @@
<h4 class="text-sm not-italic font-light leading-6 text-gray-600">
{{ featured.date | date(format="%B %e, %Y", timezone="America/Chicago")}} -
{% for author in featured.extra.authors %}
{% set fullpath = "/people/" ~ author | replace(from='_', to='-' ) %}
<a href="{{fullpath}}" tooltip="{{author}}" class="capitalize text-gray-800"> <img
src="{{ featured.extra.authorImg }}" alt="{{ author | replace(from='_', to=' ' ) }}" class="
{% for author in featured.taxonomies.people %}
{% set author_path = 'people/' ~ author ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
<a href="{{author.permalink}}" tooltip="{{author.title}}" class="capitalize text-gray-800"> <img
src="{{ author_img }}" alt="{{ author.title }}" class="
inline-flex
w-8
h-8
rounded-full
bg-gray-200
border-2 border-white
" /> {{author | replace(from='_', to=' ' )}}</a>
" /> {{ author.title }}</a>
{% endfor %}
</h4>