From 43c31a2f087daef87e49562f3e19b66de8a483c3 Mon Sep 17 00:00:00 2001 From: dataCobra Date: Tue, 1 Sep 2020 17:13:33 +0200 Subject: [PATCH] Add cmd option for .Site.Params.social The url option is as the name suggests only for urls. If the social icon should use a commands like "mailto:example@example.org" the new option cmd should be used instead of url. This is a reaction of the commit who updated links to use relURL. This update caused problems with commands like "mailto:" this is now the new way to go. For an example see the config file in exampleSite/ --- exampleSite/config.toml | 5 +++++ layouts/partials/header.html | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index c1b5fbe..bc5fef0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -111,6 +111,11 @@ name = "Github" icon = "fab fa-github" url = "https://github.com/dataCobra/hugo-vitae" +#[[params.social]] +#name = "Email" +#icon = "fas fa-envelope" +#cmd = "mailto:example@example.com" + [[params.social]] name = "RSS" icon = "fas fa-rss" diff --git a/layouts/partials/header.html b/layouts/partials/header.html index b5caddc..27727df 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -21,7 +21,11 @@

{{ .Site.Title }}