Skip to content

Commit 7aa5e14

Browse files
Add authors name as link to social media if existing. (#32)
* Use twitter link if the author has one in the authors file. * Remove duplicate author link.
1 parent 89738ea commit 7aa5e14

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

_layouts/post.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ <h4>RECENT POSTS</h4>
1919

2020
<div class="col-md-8">
2121
<h1>{{ page.title }}</h1>
22-
<p>{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
22+
<p>{{ page.date | date: "%b %-d, %Y" }}
23+
{% if page.author %} •
24+
{% assign author = site.data.authors[page.author] %}
25+
{% if author.twitter %}
26+
<a rel="author"
27+
href="https://twitter.com/{{ author.twitter }}"
28+
title="{{ author.name }}">{{page.author}}
29+
</a>
30+
{% else %}
31+
{{page.author}}
32+
{% endif %}
33+
{% endif %}
34+
{% if page.meta %} • {{ page.meta }}{% endif %}</p>
2335
<div id="markdown-content-container">{{ content }}</div>
2436
<hr>
2537
<ul class="pager">

_posts/2019-03-20-micro-ROS_at_ERF2019.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,3 @@ The micro-ROS community demo was presented, making use of a Kobuki, one of the p
1818
### Videos
1919

2020
<iframe width="560" height="315" src="https://www.youtube.com/embed/Ca0wmFLi_oY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
21-
22-
{% assign author = site.data.authors[page.author] %}
23-
<a rel="author"
24-
href="https://twitter.com/{{ author.twitter }}"
25-
title="{{ author.name }}">
26-
{{ author.name }}
27-
</a>

0 commit comments

Comments
 (0)