Skip to content

Commit

Permalink
Add nofollow tag to all status links to prevent unwanted indexing (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-nu authored Feb 8, 2024
1 parent ceae69d commit ec121a7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/App/Statuses/Status/Merge/Merge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Merge = ({ title, url }: Props): ReactElement | null => {

if (url) {
return (
<LinkBox href={url} target="_blank">
<LinkBox href={url} target="_blank" rel="nofollow">
<Icon icon="merge_type" /> {title || 'request'}
</LinkBox>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/App/Statuses/Status/Source/Source.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Source = ({ type, url }: Props): ReactElement => {

if (url) {
return (
<LinkBox href={url} target="_blank">
<LinkBox href={url} target="_blank" rel="nofollow">
{getIcon(type)}
</LinkBox>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/App/Statuses/Status/Status.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const boxBase = css`
border-radius: 0.25rem;
min-width: 1.6em;
min-height: 2rem;
max-width: 15rem;
max-width: 20rem;
${ellipsis};
svg {
Expand Down
2 changes: 1 addition & 1 deletion frontend/App/Statuses/Status/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Statuses = ({ status }: Props): ReactElement => {
)}
<Merge title={status.mergeTitle} url={status.mergeUrl} />
{status.url && (
<LinkBox href={status.url} target="_blank">
<LinkBox href={status.url} target="_blank" rel="nofollow">
<Icon icon="launch" /> {pettyUrl(status.url)}
</LinkBox>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/App/Statuses/Status/User/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const User = ({ username, url }: Props): ReactElement | null => {

if (url) {
return (
<LinkBox href={url} target="_blank">
<LinkBox href={url} target="_blank" rel="nofollow">
<Icon icon="person" /> {username || 'User'}
</LinkBox>
);
Expand Down

0 comments on commit ec121a7

Please sign in to comment.