mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +00:00
* Insert arbitrary HTML attributes to social links via config.toml (fixes #121)
This commit is contained in:
commit
5bba25cd16
2 changed files with 6 additions and 1 deletions
|
@ -53,6 +53,11 @@ DefaultContentLanguage = "en" # Default language fo
|
||||||
url = "mailto:youremail@email.com" # For a direct email link, use "mailto:test@example.org".
|
url = "mailto:youremail@email.com" # For a direct email link, use "mailto:test@example.org".
|
||||||
icon = "paper-plane" # icon name without the 'fa-'
|
icon = "paper-plane" # icon name without the 'fa-'
|
||||||
icon_pack = "fas"
|
icon_pack = "fas"
|
||||||
|
[[params.social]]
|
||||||
|
url = "https://mastodon.social/"
|
||||||
|
icon = "mastodon" # icon name without the 'fa-'
|
||||||
|
icon_pack = "fab"
|
||||||
|
html_attributes = "rel=\"me\"" # Add rel attribute for Mastodon profile link verification
|
||||||
|
|
||||||
|
|
||||||
# If you don't want to use the default menu, you can define one by yourself
|
# If you don't want to use the default menu, you can define one by yourself
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="social-icons">
|
<div class="social-icons">
|
||||||
{{ range .Site.Params.social }}
|
{{ range .Site.Params.social }}
|
||||||
<a href="{{ .url }}">
|
<a href="{{ .url }}" {{ .html_attributes | safeHTMLAttr }}>
|
||||||
<i class="{{ .icon_pack}} fa-{{ .icon}}"></i>
|
<i class="{{ .icon_pack}} fa-{{ .icon}}"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue