From 5392098d00ef7f690969cf4b8279a245c38c3d3f Mon Sep 17 00:00:00 2001 From: Matthew McKinnon Date: Thu, 4 Sep 2025 21:33:17 +1000 Subject: [PATCH] feat: add custom social links - add custom type for social.links. User can set type = custom with id as a custom URL. [[social.links]] type = "custom" id = "https://example.com/" icon = "fab fa-github" --- layouts/partials/sidebar.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 75cb578..2680274 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -57,7 +57,7 @@ {{ range .Site.Params.social.links }} {{ $url := "" }} {{ $rel := "" }} - + {{ if eq .type "github" }} {{ $url = printf "https://github.com/%s" .id }} {{ else if eq .type "twitter" }} @@ -66,6 +66,8 @@ {{ $url = printf "mailto:%s" .id }} {{ else if eq .type "rss" }} {{ $url = "index.xml" | absLangURL }} + {{ else if eq .type "custom" }} + {{ $url = printf "%s" .id }} {{ else }} {{ $url = .url }} {{ end }}