mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-29 01:02:42 -04:00
Added Mastodon verification for social links
This commit is contained in:
@@ -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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user