Skip to content

Commit

Permalink
add rel-me for mastodon link
Browse files Browse the repository at this point in the history
  • Loading branch information
parabolabam committed Oct 22, 2023
1 parent 0a99879 commit 313afc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function Avatar() {
</span>
</Link>

<Link href={mastodonLink}>
<Link href={mastodonLink} additionalRel='me'>
<span className="link__content">
<FontAwesomeIcon size="2x" icon={['fab', 'mastodon']} />
</span>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ export function Link({
href = '#',
targetBlank = true,
showIcon = false,
additionalRel = ''
}) {
const relOfLinks = ['noopener', 'noreferrer', additionalRel].join(' ');

return (
<>
<a
className="link"
href={href}
target={targetBlank ? '_blank' : '_self'}
rel="noopener noreferrer"
rel={relOfLinks}
>
{children}
<span className={showIcon ? 'link__icon' : ''}>
Expand Down

0 comments on commit 313afc7

Please sign in to comment.