diff --git a/app/profile/client-page.tsx b/app/profile/client-page.tsx index 06535252f..a163aa872 100644 --- a/app/profile/client-page.tsx +++ b/app/profile/client-page.tsx @@ -167,7 +167,7 @@ export default function ProfileClientPage({ data }: ProfileClientPageProps) { />

{isAuthenticated ? user?.name : ""}

- + GitHub Profile diff --git a/app/user/client-page.tsx b/app/user/client-page.tsx index 20b2af83f..0a7b0fed2 100644 --- a/app/user/client-page.tsx +++ b/app/user/client-page.tsx @@ -328,6 +328,7 @@ export default function UserRulesClientPage({ ruleCount }) { diff --git a/components/ArchivedReasonContent.tsx b/components/ArchivedReasonContent.tsx index 52e41c5a5..c3d9f6447 100644 --- a/components/ArchivedReasonContent.tsx +++ b/components/ArchivedReasonContent.tsx @@ -152,7 +152,7 @@ export default function ArchivedReasonContent({ reason, className = "" }: Archiv } return ( - + {segment.content} ); diff --git a/components/AuthorsCard.tsx b/components/AuthorsCard.tsx index 24651d14d..30e7688bd 100644 --- a/components/AuthorsCard.tsx +++ b/components/AuthorsCard.tsx @@ -100,7 +100,7 @@ export default function AuthorsCard({ authors }: AuthorsCardProps) {
{/* @ts-expect-error tinacms types are wrong */}
- + {imgSrc?.trim() && (
- + SSW Foursquare diff --git a/components/CategoryActionButtons.tsx b/components/CategoryActionButtons.tsx index 3f5862f04..f09454a2e 100644 --- a/components/CategoryActionButtons.tsx +++ b/components/CategoryActionButtons.tsx @@ -26,7 +26,7 @@ const CategoryActionButtons: React.FC = () => { diff --git a/components/HelpImproveCard.tsx b/components/HelpImproveCard.tsx index d397b6c35..7880d979e 100644 --- a/components/HelpImproveCard.tsx +++ b/components/HelpImproveCard.tsx @@ -14,7 +14,7 @@ export default function HelpImproveCard() { className="underline" href="https://twitter.com/adamcogan" target="_blank" - rel="noopener noreferrer" + rel="noopener noreferrer nofollow" > tweet me diff --git a/components/JoinConversationCard.tsx b/components/JoinConversationCard.tsx index ffe974f09..508d9c348 100644 --- a/components/JoinConversationCard.tsx +++ b/components/JoinConversationCard.tsx @@ -4,7 +4,7 @@ import { RiTwitterXLine } from "react-icons/ri"; export default function JoinConversationCard() { return (
- + Post #SSWRules diff --git a/components/OpenInChatGptButton.tsx b/components/OpenInChatGptButton.tsx index e3288cdd0..ac2f5650f 100644 --- a/components/OpenInChatGptButton.tsx +++ b/components/OpenInChatGptButton.tsx @@ -18,7 +18,7 @@ You are to assist the user with their queries about this rule - and if they have }, []); return ( - + Open in ChatGPT diff --git a/components/QuickLinksCard.tsx b/components/QuickLinksCard.tsx index aaf0c4a75..a4eb3307b 100644 --- a/components/QuickLinksCard.tsx +++ b/components/QuickLinksCard.tsx @@ -12,7 +12,7 @@ const QuickLinksCard = ({ links } : QuickLinksProps) => {
    {links.map((link) => (
  • - {link.linkText} + {link.linkText}
  • ))}
diff --git a/components/RuleCard.tsx b/components/RuleCard.tsx index c0b950e57..afe0caee9 100644 --- a/components/RuleCard.tsx +++ b/components/RuleCard.tsx @@ -24,7 +24,7 @@ export default function RuleCard({ title, slug, lastUpdatedBy, lastUpdated, inde

{authorUrl && (lastUpdatedBy || "Unknown") !== "Unknown" ? ( - + {lastUpdatedBy || "Unknown"} ) : ( diff --git a/components/WhyRulesCard.tsx b/components/WhyRulesCard.tsx index 71666aab3..9606628e3 100644 --- a/components/WhyRulesCard.tsx +++ b/components/WhyRulesCard.tsx @@ -9,7 +9,7 @@ export default function WhyRulesCard() { className="underline" href="https://www.codemag.com/article/0605091" target="_blank" - rel="noopener noreferrer" + rel="noopener noreferrer nofollow" > History of SSW Rules diff --git a/components/auth/UserDropdown.tsx b/components/auth/UserDropdown.tsx index fb7e4d542..44b2436be 100644 --- a/components/auth/UserDropdown.tsx +++ b/components/auth/UserDropdown.tsx @@ -102,7 +102,7 @@ export default function UserDropdown() { GitHub Profile diff --git a/components/last-updated-by/index.tsx b/components/last-updated-by/index.tsx index 6422fc1e9..419f59467 100644 --- a/components/last-updated-by/index.tsx +++ b/components/last-updated-by/index.tsx @@ -83,7 +83,7 @@ export default function GitHubMetadata({ owner = "tinacms", repo = "tina.io", pa Last updated by{" "} {shouldShowLink ? ( - + {displayAuthorName} ) : ( @@ -99,7 +99,7 @@ export default function GitHubMetadata({ owner = "tinacms", repo = "tina.io", pa href={historyUrl} target="_blank" title={tooltipContent} - rel="noopener noreferrer" + rel="noopener noreferrer nofollow" className="underline flex flex-row items-center gap-1.5 mb-2 md:mb-0" > See history @@ -120,7 +120,7 @@ export default function GitHubMetadata({ owner = "tinacms", repo = "tina.io", pa href={historyUrl} target="_blank" title="View commit history on GitHub" - rel="noopener noreferrer" + rel="noopener noreferrer nofollow" className="underline flex flex-row items-center gap-1.5 mb-2 md:mb-0" > See history diff --git a/components/layout/nav/footer.tsx b/components/layout/nav/footer.tsx index 47e79fe14..650fcd166 100644 --- a/components/layout/nav/footer.tsx +++ b/components/layout/nav/footer.tsx @@ -20,7 +20,7 @@ export const Footer = () => { Loving SSW Rules?{" "} - + Star us on GitHub. {" "} @@ -36,6 +36,8 @@ export const Footer = () => { FEEDBACK / SUGGEST A FEATURE @@ -43,6 +45,8 @@ export const Footer = () => { TERMS AND CONDITIONS @@ -54,7 +58,7 @@ export const Footer = () => { title="SSW on TikTok" href="https://www.tiktok.com/@ssw_tv" target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > @@ -64,7 +68,7 @@ export const Footer = () => { title="SSW on Twitter" href="https://twitter.com/SSW_TV" target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > @@ -74,7 +78,7 @@ export const Footer = () => { title="SSW on Instagram" href="https://www.instagram.com/ssw_tv" target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > @@ -84,7 +88,7 @@ export const Footer = () => { title="SSW on Facebook" href="https://www.facebook.com/SSW.page" target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > @@ -94,7 +98,7 @@ export const Footer = () => { title="SSW on LinkedIn" href="https://www.linkedin.com/company/ssw" target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > @@ -104,7 +108,7 @@ export const Footer = () => { title="SSW on YouTube" href="https://www.youtube.com/user/sswtechtalks" target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > @@ -127,7 +131,7 @@ export const Footer = () => { className="inline-block text-white visited:text-white leading-3 transition-all duration-300 ease-in-out hover:text-ssw-red" href={deploymentUrl} target="_blank" - rel="noreferrer" + rel="noopener noreferrer nofollow" > {versionDeployed} diff --git a/components/rule-list/rule-list-item.tsx b/components/rule-list/rule-list-item.tsx index eae2f36c0..73ef60c7d 100644 --- a/components/rule-list/rule-list-item.tsx +++ b/components/rule-list/rule-list-item.tsx @@ -60,8 +60,8 @@ const RuleListItem: React.FC = ({ rule, index, filter, onBook $1') - ?.replace(/https?:\/\/[^\s]+/g, '$&'), + ?.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') + ?.replace(/https?:\/\/[^\s]+/g, '$&'), }} />

diff --git a/components/server/MegaMenuWrapper.tsx b/components/server/MegaMenuWrapper.tsx index edf874f83..c7f2ad0ff 100644 --- a/components/server/MegaMenuWrapper.tsx +++ b/components/server/MegaMenuWrapper.tsx @@ -55,7 +55,7 @@ const ActionButtons = () => { { @@ -70,7 +70,7 @@ const ActionButtons = () => { { { @@ -106,9 +107,9 @@ export const getTypographyComponents = (enableAnchors = false) => ({ } return ( - + {props.children} - + ); }, li: (props) =>
  • , diff --git a/components/ui/icon-link.tsx b/components/ui/icon-link.tsx index e93c873e0..48b67ce0b 100644 --- a/components/ui/icon-link.tsx +++ b/components/ui/icon-link.tsx @@ -21,16 +21,20 @@ const IconLink: React.FC = ({ href, children, className = "", tit const baseClasses = "inline-flex items-center justify-center rounded-md font-medium transition-colors hover:text-[var(--ssw-red)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"; + const isExternal = href.startsWith("http"); let adjustedHref = href; - if (href.startsWith("http")) { + if (isExternal) { adjustedHref = href; } else { adjustedHref = `${basePath}${href}`; } + const effectiveRel = rel ?? (isExternal ? "noopener noreferrer nofollow" : undefined); + const effectiveTarget = target ?? (isExternal ? "_blank" : undefined); + const link = ( - + {children} );