Skip to content

Commit

Permalink
Add support for YouTube channel URLs in author sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Dec 22, 2016
1 parent 02feaf9 commit 7eccd29
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ author:
vine :
weibo :
xing :
youtube :
youtube : # "https://youtube.com/c/MichaelRoseDesign"


# Reading Files
Expand Down
8 changes: 7 additions & 1 deletion _includes/author-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
</li>
{% endif %}

{% if author.youtube %}
{% if author.youtube contains "://" %}
<li>
<a href="{{ author.youtube }}" itemprop="sameAs">
<i class="fa fa-fw fa-youtube-square" aria-hidden="true"></i> YouTube
</a>
</li>
{% else %}
<li>
<a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs">
<i class="fa fa-fw fa-youtube-square" aria-hidden="true"></i> YouTube
Expand Down
3 changes: 2 additions & 1 deletion test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ author:
vine :
weibo :
xing :
youtube :
youtube : # "https://youtube.com/c/MichaelRoseDesign"



# Reading Files
Expand Down

0 comments on commit 7eccd29

Please sign in to comment.