diff --git a/layout/_partials/sidebar/site-overview.njk b/layout/_partials/sidebar/site-overview.njk index 9411517..997e86f 100644 --- a/layout/_partials/sidebar/site-overview.njk +++ b/layout/_partials/sidebar/site-overview.njk @@ -67,7 +67,7 @@ {%- set sidebarURL = link.split('||')[0] | trim %} {%- set sidebarIcon = '' 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'}) }} {%- endfor %} diff --git a/scripts/helpers/next-url.js b/scripts/helpers/next-url.js index 5f06921..9cb49cc 100644 --- a/scripts/helpers/next-url.js +++ b/scripts/helpers/next-url.js @@ -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.