From 7fa7590d2fcee805a0c924492a8765d80d08905c Mon Sep 17 00:00:00 2001 From: Giuseppe Pignataro Date: Fri, 15 Mar 2019 11:06:37 +0100 Subject: [PATCH] Added gravatar support --- exampleSite/config.toml | 7 ++----- layouts/partials/home_post.html | 8 ++++---- layouts/partials/home_profile.html | 8 +++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 37c3712..78a80ab 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -42,7 +42,6 @@ disqusShortname = "yourdiscussshortname" [params] since = 2012 author = "Fastbyte01" # Author's name - avatar = "/images/me/avatar.jpeg" # Author's avatar subtitle = "A Hugo theme" # Subtitle cdn_url = "" # Base CDN URL home_mode = "" # post or other @@ -51,10 +50,8 @@ disqusShortname = "yourdiscussshortname" socialShare = true - - - - +[params.gravatar] + email = "" description = "" # site description keywords = "" # site keywords diff --git a/layouts/partials/home_post.html b/layouts/partials/home_post.html index 60cc8ae..594b298 100644 --- a/layouts/partials/home_post.html +++ b/layouts/partials/home_post.html @@ -1,11 +1,10 @@
- {{ $cdn_url := .Scratch.Get "cdn_url" }} - {{ with .Site.Params.avatar}} - {{ $avatar := .}} + {{ $cdn_url := .Scratch.Get "cdn_url" }} +
- + gravatar
{{ end }} {{ with .Site.Params.subtitle}} @@ -63,3 +62,4 @@ {{ partial "paginator.html" . }}
+ diff --git a/layouts/partials/home_profile.html b/layouts/partials/home_profile.html index f4307d3..fc92926 100644 --- a/layouts/partials/home_profile.html +++ b/layouts/partials/home_profile.html @@ -1,11 +1,9 @@
{{ $cdn_url := .Scratch.Get "cdn_url" }} - {{ with .Site.Params.avatar}} - {{ $avatar := .}} +
- + gravatar
- {{ end }} {{ with .Site.Params.subtitle}}

{{ . }} @@ -14,4 +12,4 @@ -

\ No newline at end of file +