Skip to content

Commit 6784639

Browse files
itrichbitbrain
andauthored
Add possibility to define local avatar image (#63)
* Add possibility to define local avatar image * Use absolute path to assets folder Co-authored-by: miguel <[email protected]>
1 parent 774bef4 commit 6784639

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ plugins:
5252
# Replaces the default avatar provider (gravatar)
5353
#avatar_source: github
5454
#github_username: bitbrain
55+
#avatar_source: local
56+
#avatar_path: /assets/avatar.png

_includes/author.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{% capture avatar_image %}
44
https://github.com/{{ site.github_username }}.png
55
{% endcapture %}
6+
{% elsif site.avatar_source == "local" and site.avatar_path %}
7+
{% capture avatar_image %}
8+
{{site.avatar_path}}
9+
{% endcapture %}
610
{% elsif site.plugins contains "liquid-md5" %}
711
{% capture avatar_image %}
812
https://gravatar.com/avatar/{{ site.email | downcase | md5 }}?s=256

assets/avatar.png

13.1 KB
Loading

0 commit comments

Comments
 (0)