add author taxonomy support to blog page & card
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
{% extends "_default/base.html" %}
|
||||
{% block content %}
|
||||
|
||||
{% if page.taxonomies.people %}
|
||||
{% set author_path = 'people/' ~ page.taxonomies.people[0] ~ '/index.md' %}
|
||||
{% set author = get_page(path=author_path) %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Default page template for blog posts and basic informative markdown files -->
|
||||
<main>
|
||||
|
||||
@@ -19,7 +24,9 @@
|
||||
<div class="flex justify-between items-center">
|
||||
<ul class="list-none flex author-list m-0">
|
||||
<li class="author-list-item">
|
||||
<img src="/{{page.extra.authorImg}}" alt="{{page.extra.author}}" class="
|
||||
{% if author %}
|
||||
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
|
||||
<img src="{{author_img}}" alt="{{author.title}}" class="
|
||||
h-8
|
||||
w-8
|
||||
sm:h-10
|
||||
@@ -29,11 +36,14 @@
|
||||
border-2 border-white
|
||||
" />
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="pl-3 flex flex-col text-xs leading-none uppercase">
|
||||
<p class="text-gray-700 text-xs">{{ page.extra.author }}</p>
|
||||
{% if author %}
|
||||
<p class="text-gray-700 text-xs">{{ author.title }}</p>
|
||||
{% endif %}
|
||||
<p class="text-gray-700 text-xs">
|
||||
<time datetime="{{ page.date }}"> {{ page.date | date(format="%B %e, %Y", timezone="America/Chicago") }}</time>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user