Skip to content

Commit bbc49c4

Browse files
authored
Adding rel tags to internal and external links (#2354)
* Adding rel tags to internal and external links * Adding rel to missing links in the previous commit
1 parent 2c265e8 commit bbc49c4

19 files changed

+42
-32
lines changed

app/profile/client-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default function ProfileClientPage({ data }: ProfileClientPageProps) {
167167
/>
168168
<div>
169169
<h1>{isAuthenticated ? user?.name : ""}</h1>
170-
<a className="flex align-center underline" href={`https://www.github.com/${user?.nickname}`} target="_blank" rel="noreferrer">
170+
<a className="flex align-center underline" href={`https://www.github.com/${user?.nickname}`} target="_blank" rel="noopener noreferrer nofollow">
171171
<RiGithubFill size={20} className=" my-2 mx-1" />
172172
<span className="my-2">GitHub Profile</span>
173173
</a>

app/user/client-page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ export default function UserRulesClientPage({ ruleCount }) {
328328

329329
<a
330330
target="_blank"
331+
rel="noopener noreferrer"
331332
href={`https://ssw.com.au/people/${author.slug}/`}
332333
className="inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-800 border border-gray-400 rounded-md hover:border-ssw-red hover:text-ssw-red transition-colors leading-5"
333334
>

components/ArchivedReasonContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default function ArchivedReasonContent({ reason, className = "" }: Archiv
152152
}
153153

154154
return (
155-
<a key={index} href={href} className={linkClassName} target="_blank" rel="noopener noreferrer">
155+
<a key={index} href={href} className={linkClassName} target="_blank" rel="noopener noreferrer nofollow">
156156
{segment.content}
157157
</a>
158158
);

components/AuthorsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default function AuthorsCard({ authors }: AuthorsCardProps) {
100100
<div className="px-2 flex items-center my-2 justify-center" key={`author_${index}`}>
101101
{/* @ts-expect-error tinacms types are wrong */}
102102
<div className="w-12 h-12 overflow-hidden rounded-full relative" data-tina-field={tinaField(authors?.[index], "title")}>
103-
<a href={author.url} target="_blank" rel="noopener noreferrer">
103+
<a href={author.url} target="_blank" rel="noopener noreferrer nofollow">
104104
{imgSrc?.trim() && (
105105
<Image
106106
src={imgSrc}

components/Breadcrumbs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function Breadcrumbs({ categories, isCategory = false, isHomePage
3737
return (
3838
<nav aria-label="Breadcrumb" className="m-4 mt-2">
3939
<div className="grid grid-cols-[auto_1fr] gap-2 items-start md:items-center">
40-
<a href={parentSiteUrl} className="inline-flex items-center shrink-0 translate-y-[2px] md:translate-y-0 md:h-[1.5em]">
40+
<a href={parentSiteUrl} target="_blank" rel="noopener noreferrer" className="inline-flex items-center shrink-0 translate-y-[2px] md:translate-y-0 md:h-[1.5em]">
4141
<img alt="SSW Foursquare" src={withBasePath(iconSrc)} width={16} height={16} className="block w-4 h-4" loading="lazy" decoding="async" />
4242
<ChevronIcon className="ml-2 hidden md:block" size={18} />
4343
</a>

components/CategoryActionButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const CategoryActionButtons: React.FC = () => {
2626
<a
2727
href="https://www.ssw.com.au/ssw/Standards/Default.aspx"
2828
target="_blank"
29-
rel="noopener noreferrer"
29+
rel="noopener noreferrer nofollow"
3030
className="flex items-center justify-center gap-2 px-3 py-1.5 sm:px-4 sm:py-2 text-xs sm:text-sm text-gray-700 bg-white rounded-md border hover:bg-gray-50 hover:text-ssw-red transition-colors duration-200 no-underline text-center"
3131
>
3232
<BiLinkExternal className="hidden sm:block w-4 h-4" />

components/HelpImproveCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function HelpImproveCard() {
1414
className="underline"
1515
href="https://twitter.com/adamcogan"
1616
target="_blank"
17-
rel="noopener noreferrer"
17+
rel="noopener noreferrer nofollow"
1818
>
1919
tweet me
2020
</a>

components/JoinConversationCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { RiTwitterXLine } from "react-icons/ri";
44
export default function JoinConversationCard() {
55
return (
66
<div className="flex justify-center">
7-
<a href="https://twitter.com/intent/tweet?hashtags=SSWRules%2C&original_referer=https%3A%2F%2Fwww.ssw.com.au%2F&ref_src=twsrc%5Etfw%7Ctwcamp%5Ebuttonembed%7Ctwterm%5Ehashtag%7Ctwgr%5ESSWRules" className="flex items-center text-white bg-gray-800 hover:bg-gray-700 rounded-full px-4 py-2">
7+
<a href="https://twitter.com/intent/tweet?hashtags=SSWRules%2C&original_referer=https%3A%2F%2Fwww.ssw.com.au%2F&ref_src=twsrc%5Etfw%7Ctwcamp%5Ebuttonembed%7Ctwterm%5Ehashtag%7Ctwgr%5ESSWRules" target="_blank" rel="noopener noreferrer nofollow" className="flex items-center text-white bg-gray-800 hover:bg-gray-700 rounded-full px-4 py-2">
88
<RiTwitterXLine className="inline mr-2" size={24} />
99
Post #SSWRules
1010
</a>

components/OpenInChatGptButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You are to assist the user with their queries about this rule - and if they have
1818
}, []);
1919

2020
return (
21-
<Link href={uri} target="_blank" aria-label="Open in ChatGPT" className="flex items-center px-2 py-1 border rounded-md hover:bg-ssw-red hover:text-white">
21+
<Link href={uri} target="_blank" rel="noopener noreferrer nofollow" aria-label="Open in ChatGPT" className="flex items-center px-2 py-1 border rounded-md hover:bg-ssw-red hover:text-white">
2222
<RiOpenaiFill />
2323
<span className="ml-1 text-sm font-semibold">Open in ChatGPT</span>
2424
</Link>

components/QuickLinksCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const QuickLinksCard = ({ links } : QuickLinksProps) => {
1212
<ul>
1313
{links.map((link) => (
1414
<li key={link.uri}>
15-
<Link href={link.uri} target="_blank" rel="noopener noreferrer">{link.linkText}</Link>
15+
<Link href={link.uri} target="_blank" rel="noopener noreferrer nofollow">{link.linkText}</Link>
1616
</li>
1717
))}
1818
</ul>

0 commit comments

Comments
 (0)