Skip to content

Commit 858b9d1

Browse files
bamnetclaude
andcommitted
Look up author display name from authors data file
Resolve author keys (e.g. bamnet) to full names (Brian Michalski) via _data/authors.yml. Falls back to the raw frontmatter value if no match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b7918c1 commit 858b9d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_layouts/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<article>
2323
<section>
2424
<h1 class="post-title">{{ page.title }}</h1>
25-
<p class="post-meta">{{ page.date | date: "%B %-d, %Y" }} by {{ page.author }}</p>
25+
{% assign author = site.data.authors[page.author] %}<p class="post-meta">{{ page.date | date: "%B %-d, %Y" }} by {{ author.name | default: page.author }}</p>
2626
<div class="block">{{ content }}</div>
2727
</section>
2828
</article>

blog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<article style="padding-bottom:3em;">
1313
<section>
1414
<h1 class="post-title"><a href="{{page.url}}">{{ page.title }}</a></h1>
15-
<p class="post-meta">{{ page.date | date: "%B %-d, %Y" }} by {{ page.author }}</p>
15+
{% assign author = site.data.authors[page.author] %}<p class="post-meta">{{ page.date | date: "%B %-d, %Y" }} by {{ author.name | default: page.author }}</p>
1616
<div class="block">{{ page.content }}</div>
1717
</section>
1818
<div class="clear"></div>

0 commit comments

Comments
 (0)