Added Mastodon verification for social links

This commit is contained in:
squidfunk
2023-02-03 17:33:28 +01:00
parent fa1c596223
commit 3fc8b6be8b
6 changed files with 19 additions and 5 deletions

View File

@@ -23,6 +23,14 @@
<!-- Social links -->
<div class="md-social">
{% for social in config.extra.social %}
<!-- Automatically set rel=me for Mastodon -->
{% set rel = "noopener" %}
{% if "mastodon" in social.icon %}
{% set rel = rel ~ " me" %}
{% endif %}
<!-- Compute title and render link -->
{% set title = social.name %}
{% if not title and "//" in social.link %}
{% set _, url = social.link.split("//") %}
@@ -30,7 +38,7 @@
{% endif %}
<a
href="{{ social.link }}"
target="_blank" rel="noopener"
target="_blank" rel="{{ rel }}"
title="{{ title | e }}"
class="md-social__link"
>