From ba84760563531a6c955edda6d129a53a887f1b13 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 12 Jun 2017 02:07:28 +0100 Subject: [PATCH] about: Support avatars from Gravatar.com (#194) --- exampleSite/config.toml | 3 ++- layouts/partials/widgets/about.html | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 66e08373..04a45960 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -23,7 +23,8 @@ defaultContentLanguageInSubdir = false role = "Professor of Artificial Intelligence" organization = "Stanford University" organization_url = "" - avatar = "portrait.jpg" + gravatar = false # Get your avatar from Gravatar.com? (true/false) + avatar = "portrait.jpg" # Specify an avatar image (in `static/img/` folder) or delete value to disable avatar. email = "test@example.org" address = "Building 1 Room 1, Stanford University, California, 90210, USA" office_hours = "Monday 10:00 to 13:00 or email for appointment" diff --git a/layouts/partials/widgets/about.html b/layouts/partials/widgets/about.html index 85dfa23d..76c967ea 100644 --- a/layouts/partials/widgets/about.html +++ b/layouts/partials/widgets/about.html @@ -6,10 +6,12 @@
- {{ with $.Site.Params.avatar }} -
-
- + {{ if $.Site.Params.gravatar }} +
+ + {{ else if $.Site.Params.avatar }} +
+ {{ end }}