Add rel="me" to social links (#605)

This commit is contained in:
Mudkip 2022-12-24 01:35:25 +08:00 committed by GitHub
parent 7c49d60389
commit c3005037ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@
{%- set sidebarURL = link.split('||')[0] | trim %}
{%- set sidebarIcon = '<i class="' + link.split('||')[1] | trim + ' fa-fw"></i>' if theme.social_icons.enable and link.split('||')[1] else '' %}
{%- set sidebarText = '' if (theme.social_icons.enable and theme.social_icons.icons_only) else name %}
{{ next_url(sidebarURL, sidebarIcon + sidebarText, {title: name + ' → ' + sidebarURL}) }}
{{ next_url(sidebarURL, sidebarIcon + sidebarText, {title: name + ' → ' + sidebarURL, rel: 'noopener me'}) }}
</span>
{%- endfor %}
</div>

View File

@ -42,7 +42,7 @@ module.exports = function(path, text, options = {}) {
if (!theme.exturl) {
// Only for simple link need to rewrite/add attributes.
attrs.rel = 'noopener';
attrs.rel = attrs.rel || 'noopener';
attrs.target = '_blank';
} else {
// Remove rel attributes for `exturl` in main menu.