From 4cdef8f49337add2418c27dbb1619b2a4a0c3abd Mon Sep 17 00:00:00 2001 From: Dillon Date: Fri, 10 Jun 2022 23:13:28 +0800 Subject: [PATCH] feat: support rel in social link item --- layouts/partials/home/profile.html | 3 +++ layouts/partials/plugin/social.html | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index 3f444ab8..447b416f 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -71,6 +71,9 @@ {{- with $value.icon -}} {{- $social = dict "Icon" . | merge $social -}} {{- end -}} + {{- with $value.rel -}} + {{- $social = dict "Rel" . | merge $social -}} + {{- end -}} {{- else if ne $value true -}} {{- $social = dict "Id" $value | merge $social -}} {{- end -}} diff --git a/layouts/partials/plugin/social.html b/layouts/partials/plugin/social.html index 67a27b7d..4b74a940 100644 --- a/layouts/partials/plugin/social.html +++ b/layouts/partials/plugin/social.html @@ -8,4 +8,8 @@ {{- end -}} {{- $destination = printf (string $template) .Id -}} {{- end -}} -{{- dict "Destination" $destination "Rel" "me" | merge . | partial "plugin/a.html" -}} +{{- $rel := "me" -}} +{{- with .Rel -}} + {{- $rel = printf "%v %v" $rel . -}} +{{- end -}} +{{- dict "Destination" $destination "Rel" $rel | merge . | partial "plugin/a.html" -}}