mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
about widget: Add support for linking to forum/chat/mailing-list
* Example: `discussion = { name = "Discuss", url = "https://discourse.gohugo.io" }` can be added to `[params]` section of `config.toml` * Add noopener to links that open in new tab See #351
This commit is contained in:
parent
0e57c732fe
commit
ec4fe2eb29
2 changed files with 15 additions and 2 deletions
|
@ -58,6 +58,10 @@ defaultContentLanguageInSubdir = false
|
|||
# Enable Keybase in Contact section by entering your keybase.io username.
|
||||
keybase = ""
|
||||
|
||||
# Discussion link (e.g. link to a forum, mailing list, or chat).
|
||||
# Uncomment line below to use.
|
||||
# discussion = { name = "Discuss", url = "https://discourse.gohugo.io" }
|
||||
|
||||
# Diplay a logo in navigation bar rather than title (optional).
|
||||
# To enable, place an image in `static/img/` and reference its filename below. To disable, set the value to "".
|
||||
logo = ""
|
||||
|
|
|
@ -22,11 +22,20 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with $.Site.Params.discussion }}
|
||||
<li>
|
||||
<i class="fa-li fa fa-comments-o fa-2x" aria-hidden="true"></i>
|
||||
<span>
|
||||
<a href="{{ .url }}" target="_blank" rel="noopener">{{ .name }}</a>
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with $.Site.Params.keybase }}
|
||||
<li>
|
||||
<i class="fa-li fa fa-lock fa-2x" aria-hidden="true"></i>
|
||||
<span>
|
||||
<a href="https://keybase.io/{{ . }}" target="_blank">@{{ . }}</a> on Keybase.
|
||||
<a href="https://keybase.io/{{ . }}" target="_blank" rel="noopener">@{{ . }}</a> on Keybase.
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
@ -53,7 +62,7 @@
|
|||
<li>
|
||||
<i class="fa-li fa fa-telegram fa-2x" aria-hidden="true"></i>
|
||||
<span>
|
||||
{{- if $autolink }}<a href="https://telegram.me/{{ . }}" target="_blank">@{{ . }}</a>{{ else }}@{{ . }}{{ end -}}
|
||||
{{- if $autolink }}<a href="https://telegram.me/{{ . }}" target="_blank" rel="noopener">@{{ . }}</a>{{ else }}@{{ . }}{{ end -}}
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue