Skip to content

Commit

Permalink
Add author support
Browse files Browse the repository at this point in the history
  • Loading branch information
jabenninghoff committed Nov 22, 2015
1 parent 4aaf9d0 commit 61e4035
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
6 changes: 6 additions & 0 deletions _data/members.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Information Safety members (for author attribution)
jabenninghoff:
name: John Benninghoff
email:
github: jabenninghoff
web:
7 changes: 6 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

<article class="post">
<h1 class="post-title">{{ page.title }}</h1>
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time>
<span datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}
{% if page.author %}
{% assign author = site.data.members[page.author] %}
&middot; <a href="https://github.com/{{ author.github }}">@{{ author.github }}</a>
{% endif %}
</span>
{{ content }}
</article>

Expand Down
1 change: 1 addition & 0 deletions _posts/2015-11-20-information-safety-launch.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: post
title: Information Safety Launch
author: jabenninghoff
comments: true
---

Expand Down
1 change: 1 addition & 0 deletions _posts/2015-11-21-stamp-stpa-2016.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: post
title: 2016 STAMP/STPA Call for Participation open
author: jabenninghoff
comments: true
---

Expand Down
8 changes: 6 additions & 2 deletions _sass/_posts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@
}

// Meta data line below post title
.post-date {
.post-date,
.post-author {
display: block;
margin-top: -.5rem;
margin-bottom: 1rem;
color: #9a9a9a;
}

a {
color: #9a9a9a;
}
}

// Related posts
.related {
Expand Down
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ <h1 class="post-title">
</a>
</h1>

<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date_to_string }}</time>
<span datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date_to_string }}
{% if post.author %}
{% assign author = site.data.members[post.author] %}
&middot; <a href="https://github.com/{{ author.github }}">@{{ author.github }}</a>
{% endif %}
</span>

{{ post.content }}

Expand Down

0 comments on commit 61e4035

Please sign in to comment.