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"
This commit is contained in:
2025-09-04 21:33:17 +10:00
parent 83d24c4127
commit 5392098d00

View File

@ -66,6 +66,8 @@
{{ $url = printf "mailto:%s" .id }} {{ $url = printf "mailto:%s" .id }}
{{ else if eq .type "rss" }} {{ else if eq .type "rss" }}
{{ $url = "index.xml" | absLangURL }} {{ $url = "index.xml" | absLangURL }}
{{ else if eq .type "custom" }}
{{ $url = printf "%s" .id }}
{{ else }} {{ else }}
{{ $url = .url }} {{ $url = .url }}
{{ end }} {{ end }}