diff --git a/README.md b/README.md index 0e62089..78d8963 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ key = 0 name = "github" url = "https://github.com/gohugoio" icon = "fa-brands fa-github" # Add link to your icon font to `layouts/partials/custom-head.html` +target = "_blank" # Defines your target option in a-href. _blank for a new Tab for example. +aria = "GitHub Profile" # Define the aria label for accessibility like page reader - this is better for your SEO [[params.social]] key = 1 diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 80f3efa..f8f5ea7 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -27,18 +27,23 @@ published = true # Show published data on post page key = 0 name = "github" url = "https://github.com/gohugoio" +target = "_blank" +aria = "GitHub Profile" [[params.social]] key = 1 name = "twitter" url = "https://www.example.com" +aria = "Twitter Profile" [[params.social]] key = 2 name = "linkedin" url = "https://www.example.com" +aria = "LinkedIn Profile" [[params.social]] key = 3 name = "email" url = "mailto:email@example.com" +aria = "My e-Mail Address" diff --git a/layouts/partials/social.html b/layouts/partials/social.html index 7d0743d..62cd519 100644 --- a/layouts/partials/social.html +++ b/layouts/partials/social.html @@ -3,11 +3,11 @@ {{ range sort .Site.Params.social "key"}}
  • {{ if isset . "icon" }} - {{ else }} - {{ .name }} + {{ end }}
  • {{ end }}