{{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }}
{{ with .Site.Params.avatarURL }}
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar" width="200" height="200"></div>
{{ end }}
{{ end }}
{{ with .Site.Params.gravatar }}
<div class="avatar"><img src="https://www.gravatar.com/avatar/{{md5 .}}?s=240&d=mp" alt="gravatar" width="200"
        height="200"></div>
{{ end }}