<div class="author-bio">
    {{ $author := index $.Site.Data.authors .Params.author | default $.Site.Data.authors.unknown }}
    <img alt="Author avatar" class="avatar" src='{{ $author.avatar }}'>
    <div class="details">
        <div class="written-by">Written by</div>
        <h3 class="name">{{ .Params.Author }}</h3>
        <div class="bio">{{ $author.bio }}</div>
        <div class="links">
            {{ if $author.links.twitter }}
            <a href="{{ $author.links.twitter }}" target="_blank"><img alt="Twitter logo" src="/svg/icon-twitter.svg"></a>
            {{ end }}
            {{ if $author.links.github }}
            <a href="{{ $author.links.github }}" target="_blank"><img alt="GitHub logo" src="/svg/icon-github.svg"></a>
            {{ end }}
        </div>
    </div>
</div>
