mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-21 19:42:52 +00:00
Add HTML attributes to social links
* Insert arbitrary HTML attributes to social links via config.toml (fixes #121)
This commit is contained in:
parent
819c058865
commit
7584ca2c4f
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".
|
||||
icon = "paper-plane" # icon name without the 'fa-'
|
||||
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="social-icons">
|
||||
{{ range .Site.Params.social }}
|
||||
<a href="{{ .url }}">
|
||||
<a href="{{ .url }}" {{ .html_attributes | safeHTMLAttr }}>
|
||||
<i class="{{ .icon_pack}} fa-{{ .icon}}"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue