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:
@ -57,7 +57,7 @@
|
|||||||
{{ range .Site.Params.social.links }}
|
{{ range .Site.Params.social.links }}
|
||||||
{{ $url := "" }}
|
{{ $url := "" }}
|
||||||
{{ $rel := "" }}
|
{{ $rel := "" }}
|
||||||
|
|
||||||
{{ if eq .type "github" }}
|
{{ if eq .type "github" }}
|
||||||
{{ $url = printf "https://github.com/%s" .id }}
|
{{ $url = printf "https://github.com/%s" .id }}
|
||||||
{{ else if eq .type "twitter" }}
|
{{ else if eq .type "twitter" }}
|
||||||
@ -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 }}
|
||||||
|
Reference in New Issue
Block a user