Skip to content

Commit

Permalink
Fix author.youtube conditional in author sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Dec 22, 2016
1 parent 66831fe commit b32f9a4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
26 changes: 14 additions & 12 deletions _includes/author-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,20 @@ <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
</li>
{% endif %}

{% 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
</a>
</li>
{% 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 author.youtube %}
<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
</a>
</li>
{% endif %}
{% endif %}

{% if author.soundcloud %}
Expand Down
26 changes: 14 additions & 12 deletions docs/_includes/author-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,20 @@ <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
</li>
{% endif %}

{% 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
</a>
</li>
{% 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 author.youtube %}
<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
</a>
</li>
{% endif %}
{% endif %}

{% if author.soundcloud %}
Expand Down
1 change: 0 additions & 1 deletion test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ author:
youtube : # "https://youtube.com/c/MichaelRoseDesign"



# Reading Files
include:
- .htaccess
Expand Down

0 comments on commit b32f9a4

Please sign in to comment.