Skip to content

Commit 7eccd29

Browse files
committed
Add support for YouTube channel URLs in author sidebar
- Close mmistakes#716
1 parent 02feaf9 commit 7eccd29

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ author:
104104
vine :
105105
weibo :
106106
xing :
107-
youtube :
107+
youtube : # "https://youtube.com/c/MichaelRoseDesign"
108108

109109

110110
# Reading Files

_includes/author-profile.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,13 @@ <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
179179
</li>
180180
{% endif %}
181181

182-
{% if author.youtube %}
182+
{% if author.youtube contains "://" %}
183+
<li>
184+
<a href="{{ author.youtube }}" itemprop="sameAs">
185+
<i class="fa fa-fw fa-youtube-square" aria-hidden="true"></i> YouTube
186+
</a>
187+
</li>
188+
{% else %}
183189
<li>
184190
<a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs">
185191
<i class="fa fa-fw fa-youtube-square" aria-hidden="true"></i> YouTube

test/_config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ author:
106106
vine :
107107
weibo :
108108
xing :
109-
youtube :
109+
youtube : # "https://youtube.com/c/MichaelRoseDesign"
110+
110111

111112

112113
# Reading Files

0 commit comments

Comments
 (0)