mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
about widget: Support organization link (#108)
* Add optional `organization_url` to config
This commit is contained in:
parent
823a1bf11b
commit
b7b20820e6
2 changed files with 9 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
baseurl = "https://example.com"
|
baseurl = "https://example.com"
|
||||||
title = "Academic Theme"
|
title = "Academic"
|
||||||
copyright = "© 2016 Your Name"
|
copyright = "© 2016 Your Name"
|
||||||
theme = "academic"
|
theme = "academic"
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
|
@ -22,6 +22,7 @@ defaultContentLanguageInSubdir = false
|
||||||
name = "Lena Smith"
|
name = "Lena Smith"
|
||||||
role = "Professor of Artificial Intelligence"
|
role = "Professor of Artificial Intelligence"
|
||||||
organization = "Stanford University"
|
organization = "Stanford University"
|
||||||
|
organization_url = ""
|
||||||
avatar = "portrait.jpg"
|
avatar = "portrait.jpg"
|
||||||
email = "test@example.org"
|
email = "test@example.org"
|
||||||
address = "Building 1 Room 1, Stanford University, California, 90210, USA"
|
address = "Building 1 Room 1, Stanford University, California, 90210, USA"
|
||||||
|
|
|
@ -15,7 +15,13 @@
|
||||||
<div class="portrait-title">
|
<div class="portrait-title">
|
||||||
<h2 itemprop="name">{{ $.Site.Params.name }}</h2>
|
<h2 itemprop="name">{{ $.Site.Params.name }}</h2>
|
||||||
<h3 itemprop="jobTitle">{{ $.Site.Params.role }}</h3>
|
<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>
|
</div>
|
||||||
|
|
||||||
<ul class="social-icon" aria-hidden="true">
|
<ul class="social-icon" aria-hidden="true">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue