From 7584ca2c4f30db8fd9d1aa59b11f25efff0fbce8 Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Sun, 13 Jan 2019 22:52:57 +0100 Subject: [PATCH] Add HTML attributes to social links * Insert arbitrary HTML attributes to social links via config.toml (fixes #121) --- exampleSite/config.toml | 5 +++++ layouts/partials/home/social.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 08aabc8..8eeb84d 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -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 diff --git a/layouts/partials/home/social.html b/layouts/partials/home/social.html index 5750b6f..34a97f1 100644 --- a/layouts/partials/home/social.html +++ b/layouts/partials/home/social.html @@ -1,6 +1,6 @@
{{ range .Site.Params.social }} - + {{ end }}