From 33fdbfed9219de3b30ab4e68c9d3a832038e7c4e Mon Sep 17 00:00:00 2001 From: stafusa <74922195+stafusa@users.noreply.github.com> Date: Fri, 30 Sep 2022 14:13:49 +0200 Subject: Implement more general Gitlab link. (#447) * Implement more general Gitlab link. Closes halogenica/beautifulhugo#436 . * Implement more general Social Icons links. Closes halogenica/beautifulhugo#436 . * Tests for http:// and https://. Closes halogenica/beautifulhugo#436 . --- exampleSite/config.toml | 1 + layouts/partials/footer.html | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4884ca2..dd58fbd 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -43,6 +43,7 @@ pygmentsCodefencesGuessSyntax = true # desc = "Hexagon" [Author] + # Set only your "username" for default hosts and full URLs otherwise (e.g., "https://MyGitLab.org/username") name = "Some Person" website = "yourwebsite.com" email = "youremail@domain.com" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 87f6a1e..cc39232 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,7 +9,11 @@ {{ range .Site.Data.beautifulhugo.social.social_icons }} {{- if isset $.Site.Author .id }}
  • - + {{ if or ( hasPrefix ( index $.Site.Author .id ) "http://" ) ( hasPrefix ( index $.Site.Author .id ) "https://" ) }} + + {{ else }} + + {{ end }} -- cgit v1.2.3