mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Add rel="me" to social links (#605)
This commit is contained in:
parent
7c49d60389
commit
c3005037ac
@ -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>
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user