feat: support rel in social link item

This commit is contained in:
Dillon 2022-06-10 23:13:28 +08:00
parent d117526bc0
commit 4cdef8f493
No known key found for this signature in database
GPG key ID: 0EF4AE57FB98F108
2 changed files with 8 additions and 1 deletions

View file

@ -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 -}}

View file

@ -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" -}}