Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2022-06-10 18:13:28 +0300
committerDillon <dillonzq@outlook.com>2022-06-10 18:13:28 +0300
commit4cdef8f49337add2418c27dbb1619b2a4a0c3abd (patch)
tree77d98d8035a75f222926027395465930467a277f
parentd117526bc02d5fe431c3348b25e6ba09c84eda66 (diff)
feat: support rel in social link item
-rw-r--r--layouts/partials/home/profile.html3
-rw-r--r--layouts/partials/plugin/social.html6
2 files changed, 8 insertions, 1 deletions
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" -}}