Skip to content

Commit 345355b

Browse files
committed
Add support for author metadata to be included in the post page
This is currently not linked, and the only author I have added is for a post I'm backporting
1 parent be79a61 commit 345355b

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ _site
33
.jekyll-cache
44
.jekyll-metadata
55
vendor
6+
*.sw*

_data/authors.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# This data file contains all the authors for the blog, with their links,
3+
# description, etc
4+
---
5+
6+
gwtrev:
7+
name: George Treviranus
8+
twitter: gwtrev
9+
about: |
10+
George is a front-end developer and digital designer living in Oakland,
11+
California. By day, he’s a front-end software engineer at Scribd. Other
12+
times, he can be found long boarding, playing video games, or napping.
13+
Usually napping.

_layouts/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1 itemprop="name headline">{{ page.title | escape }}</h1>
1313
</time>
1414

1515
{%- if page.author -%}
16-
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>
16+
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ site.data.authors[page.author].name }}</span></span>
1717
{%- endif -%}
1818
</p>
1919
</header>

0 commit comments

Comments
 (0)