Skip to content

Commit d8274e5

Browse files
authored
Merge pull request #1837 from ivan-nginx/master
Commented `avatar` not visible in sidebar for now.
2 parents 4c835d8 + 6981a3e commit d8274e5

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

_config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ social_icons:
109109
#Title: http://example.com/
110110

111111
# Sidebar Avatar
112-
# in theme directory(source/images): /images/avatar.jpg
113-
# in site directory(source/uploads): /uploads/avatar.jpg
114-
#avatar:
112+
# in theme directory(source/images): /images/avatar.gif
113+
# in site directory(source/uploads): /uploads/avatar.gif
114+
#avatar: /images/avatar.gif
115115

116116
# Table Of Contents in the Sidebar
117117
toc:

layout/_macro/sidebar.swig

+13-8
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,21 @@
2828

2929
<section class="site-overview sidebar-panel{% if not display_toc or toc(page.content).length <= 1 %} sidebar-panel-active{% endif %}">
3030
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
31-
<img class="site-author-image" itemprop="image"
32-
src="{{ url_for( theme.avatar | default(theme.images + '/avatar.gif') ) }}"
33-
alt="{{ theme.author }}" />
34-
<p class="site-author-name" itemprop="name">{{ theme.author }}</p>
35-
{% if theme.seo %}
36-
<p class="site-description motion-element" itemprop="description">{{ theme.signature }}</p>
37-
{% else %}
38-
<p class="site-description motion-element" itemprop="description">{{ theme.description }}</p>
31+
{% if theme.avatar %}
32+
<img class="site-author-image" itemprop="image"
33+
src="{{ url_for( theme.avatar | default(theme.images + '/avatar.gif') ) }}"
34+
alt="{{ theme.author }}" />
3935
{% endif %}
36+
<p class="site-author-name" itemprop="name">{{ theme.author }}</p>
37+
<p class="site-description motion-element" itemprop="description">{#
38+
#}{% if theme.seo %}{#
39+
#}{{ theme.signature }}{#
40+
#}{% else %}{#
41+
#}{{ theme.description }}{#
42+
#}{% endif %}{#
43+
#}</p>
4044
</div>
45+
4146
<nav class="site-state motion-element">
4247

4348
{% if config.archive_dir != '/' and site.posts.length > 0 %}

0 commit comments

Comments
 (0)