From 2c3ddeaf602518faacea1808d811f613d30621a0 Mon Sep 17 00:00:00 2001 From: Regis Philibert Date: Fri, 2 Dec 2022 14:20:02 -0500 Subject: [PATCH] Add a `rel` option to social registers Fixes #417 --- README.md | 5 ++++- layouts/partials/social-follow.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a16654a..4d8c3cc 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ In order to register a service to be used, user must add an `ananke_socials` par - name*: It matches the built-in service reference (Ex: twitter, github) - url*: The url of the handle's profile on the service (Ex: https://twitter.com/theNewDynamic, https://github.com/ theNewDynamic) - +- rel: Optional. Allows to add a `rel` attribute to the follow link. Useful for Mastodon verification which requires a `rel="me"` on the link. ```yaml params: ananke_socials: @@ -143,6 +143,9 @@ params: url: https://twitter.com/theNewDynamic - name: github url: https://github.com/theNewDynamic + - name: mastondon + url: https://social.example.com/@username + rel: me ``` If user needs to overwrite default `color` and `label` of the service, they simply need to append the following to the entry: diff --git a/layouts/partials/social-follow.html b/layouts/partials/social-follow.html index 7e3f920..f990ac7 100644 --- a/layouts/partials/social-follow.html +++ b/layouts/partials/social-follow.html @@ -1,7 +1,7 @@ {{ $socials := where (partialCached "func/socials/Get" "socials/Get") "follow" "!=" false }}
{{ range $socials }} - + {{ with .icon }} {{ . }} {{ else }}