mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +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".
|
||||
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