Skip to content

Commit 92533e4

Browse files
jeromegvclaude
andauthored
Add support for rel attribute on footer social links for Mastodon verification (#72)
Adds optional `rel` field to footer_social.yml entries. When set, the value is prepended to the existing `noopener` on the anchor tag (e.g. `rel="me noopener"`). Sets `rel: "me"` on the Mastodon entry to satisfy Mastodon profile URL verification. Closes #71 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b139c90 commit 92533e4

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

_data/footer_social.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ mastodon:
2828
label: Mastodon
2929
url: "https://mstdn.ca/@CivicTechTO"
3030
icon: mastodon.svg
31-
31+
rel: "me"
32+
33+
3234
instagram:
3335
label: Instagram
3436
url: "https://www.instagram.com/civictechto/"

_includes/social-links-footer.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@
3838
{% assign label = social_data.label | default: key %}
3939

4040
{% if url %}
41-
<a href="{{ url }}" target="_blank" rel="noopener" class="social-button">
41+
{% assign extra_rel = details.rel %}
42+
{% if extra_rel %}
43+
{% assign rel_value = extra_rel | append: " noopener" %}
44+
{% else %}
45+
{% assign rel_value = "noopener" %}
46+
{% endif %}
47+
<a href="{{ url }}" target="_blank" rel="{{ rel_value }}" class="social-button">
4248
{% if custom_icon %}
4349
<span class="iconstyle">{% include icons/{{ custom_icon }} %}</span>
4450
{% elsif custom_emoji %}

0 commit comments

Comments
 (0)