summaryrefslogtreecommitdiff
path: root/_includes/views/post-header.html
diff options
context:
space:
mode:
authorTom Hebb <tommyhebb@gmail.com>2023-08-23 19:52:54 -0700
committerJeffrey Tse <jeffreytse.mail@gmail.com>2023-08-24 21:40:53 +0800
commit23010243d8850e56e872c112ab6f5c75efe60a38 (patch)
tree33b94adabe2e79117ddd6e5784488bda1c37672d /_includes/views/post-header.html
parent3de31401ff89b80a94f442ba3eaba7fa9b0eaa00 (diff)
feat: show author for posts that specify one (#122)
* feat: show author for posts that specify one Posts by default inherit the site's author, but it's possible to override that per post, which affects--e.g.--the RSS metadata. For posts that do so, we don't currently show that anywhere in the theme. Add a new piece of metadata to posts, along with the date and reading time, that displays the author only when it's not inherited from the site. * Update pagination-item.html --------- Co-authored-by: JT <jeffreytse.mail@gmail.com>
Diffstat (limited to '_includes/views/post-header.html')
-rw-r--r--_includes/views/post-header.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/_includes/views/post-header.html b/_includes/views/post-header.html
index 33bbdaa..b6ea964 100644
--- a/_includes/views/post-header.html
+++ b/_includes/views/post-header.html
@@ -8,6 +8,10 @@
<i class="fa fa-calendar"></i> {{ page.date | date: date_format }}
</time>
+ {%- if page.author -%}
+ <span class="post-author left-vsplit"><i class="fa fa-pencil"></i> {{ page.author | escape }}</span>
+ {%- endif -%}
+
{% assign article = page.content %}
{% assign lang = page.lang %}
{%- include functions.html func='get_reading_time' -%}