about widget: Support organization link (#108)

* Add optional `organization_url` to config
This commit is contained in:
George Cushen 2017-01-29 01:15:35 +00:00
commit b7b20820e6
2 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,5 @@
baseurl = "https://example.com"
title = "Academic Theme"
title = "Academic"
copyright = "© 2016 Your Name"
theme = "academic"
enableEmoji = true
@ -22,6 +22,7 @@ defaultContentLanguageInSubdir = false
name = "Lena Smith"
role = "Professor of Artificial Intelligence"
organization = "Stanford University"
organization_url = ""
avatar = "portrait.jpg"
email = "test@example.org"
address = "Building 1 Room 1, Stanford University, California, 90210, USA"

View file

@ -15,7 +15,13 @@
<div class="portrait-title">
<h2 itemprop="name">{{ $.Site.Params.name }}</h2>
<h3 itemprop="jobTitle">{{ $.Site.Params.role }}</h3>
{{ with $.Site.Params.organization }}<h3 itemprop="worksFor">{{ . }}</h3>{{ end }}
{{ if $.Site.Params.organization }}
<h3 itemprop="worksFor">
{{ with $.Site.Params.organization_url }}<a href="{{ . }}" target="_blank">{{ end }}
{{ $.Site.Params.organization }}
{{ if $.Site.Params.organization_url }}</a>{{ end }}
</h3>
{{ end }}
</div>
<ul class="social-icon" aria-hidden="true">