Add support for github usernames in author lines (#974)

This commit is contained in:
Nick Johnson 2018-04-06 22:59:24 +01:00 committed by Nick Savers
parent 547af9da8c
commit 5b37c1d6c0
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,9 @@
{%- if author contains "<" -%}
{%- assign authorparts=author|split:"<" -%}
<a href="mailto:{{authorparts[1]|remove:">"}}">{{authorparts[0]|strip}}</a>
{%- elsif author contains "(@" -%}
{%- assign authorparts=author|split:"(@" -%}
<a href="https://github.com/{{authorparts[1]|remove:")"}}">{{authorparts[0]|strip}}</a>
{%- else -%}
{{author}}
{%- endif -%}