From 6babcfdb47da48f07c54bef46cf2e1a5562dc0e5 Mon Sep 17 00:00:00 2001 From: Roger Chappel Date: Wed, 13 May 2026 16:44:57 +1000 Subject: [PATCH] fix: open table github links in new tabs --- scripts/build-site.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build-site.ts b/scripts/build-site.ts index a88f526..12ba6a2 100644 --- a/scripts/build-site.ts +++ b/scripts/build-site.ts @@ -12,6 +12,7 @@ const siteUrl = (process.env.OSSRANK_SITE_URL ?? 'https://ossrank.dev').replace( const sitemapEntries: Array<{ path: string; priority: string; changefreq: string }> = []; const assetVersion = '20260509-polish1'; const updateCadenceLabel = 'Weekly refresh'; +const externalLinkAttrs = 'target="_blank" rel="noopener noreferrer"'; const logoSvg = ``; function normalizeRoute(path: string): string { @@ -139,7 +140,7 @@ function rankMovementBadge(entry: RankedContributor): string { function contributorTable(snapshot: RankingSnapshot): string { const rows = [...snapshot.entries].sort((a, b) => a.rank - b.rank); - return `
${rows.map((entry) => ``).join('')}
RankMovementUsernameLocationDiscovery
#${entry.rank}${rankMovementBadge(entry)}${escapeHtml(entry.name ?? 'Public GitHub profile')}${(entry.observed_public_commits ?? 0).toLocaleString()}${(entry.observed_public_pull_requests ?? 0).toLocaleString()}${(entry.public_repos ?? 0).toLocaleString()}${entry.followers.toLocaleString()}${escapeHtml(entry.location ?? 'Unknown')}${escapeHtml(entry.location_confidence ?? 'unknown')}${statusPill(entry.discovered_by_query ?? 'query', 'source')}