Skip to content

Commit 2896c1f

Browse files
committed
fix(website): let links to our own repo send the referrer, so GitHub credits the site
1 parent 9c5f12e commit 2896c1f

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

‎website/docusaurus.config.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ export default async function createConfig(): Promise<Config> {
648648
},
649649
{
650650
href: `${REPO_URL}/blob/main/ROADMAP.md`,
651+
// No noreferrer on links to our own repo: GitHub then credits the visit to the site.
652+
rel: "noopener",
651653
label: "Roadmap",
652654
position: "left",
653655
},
@@ -661,7 +663,7 @@ export default async function createConfig(): Promise<Config> {
661663
type: "html",
662664
position: "right",
663665
value:
664-
`<a class="navbar-github-link" href="${REPO_URL}" target="_blank" rel="noopener noreferrer">` +
666+
`<a class="navbar-github-link" href="${REPO_URL}" target="_blank" rel="noopener">` +
665667
// GitHub's own mark (Octicons `mark-github`), not a generic code glyph: the item
666668
// is one of several in the navbar and the logo is what makes it findable at a
667669
// glance. Inline for the same reason as the star above — no widget, no request.

‎website/src/pages/download.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function StarPrompt({ starCount, locale }: { starCount: number | null; locale: s
206206
OpenScreen is free and MIT licensed. A star on GitHub helps other people find it.
207207
</Translate>
208208
</p>
209-
<a className={styles.startedCta} href={REPO_URL} target="_blank" rel="noopener noreferrer">
209+
<a className={styles.startedCta} href={REPO_URL} target="_blank" rel="noopener">
210210
<Star size={14} />
211211
<Translate id="download.started.cta">Star on GitHub</Translate>
212212
{starCount !== null ? (

‎website/src/theme/Footer/index.tsx‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ export default function Footer(): ReactNode {
112112
<Translate id="footer.project.title">Project</Translate>
113113
</div>
114114
<div className={styles.colLinks}>
115-
<Link href="https://github.com/getopenscreen/openscreen">GitHub</Link>
116-
<Link href="https://github.com/getopenscreen/openscreen/releases">
115+
<Link rel="noopener" href="https://github.com/getopenscreen/openscreen">
116+
GitHub
117+
</Link>
118+
<Link rel="noopener" href="https://github.com/getopenscreen/openscreen/releases">
117119
<Translate id="footer.project.releases">Releases</Translate>
118120
</Link>
119121
<LocaleLink to="/blog/">
@@ -132,10 +134,16 @@ export default function Footer(): ReactNode {
132134
<Translate id="footer.community.title">Community</Translate>
133135
</div>
134136
<div className={styles.colLinks}>
135-
<Link href="https://github.com/getopenscreen/openscreen/blob/main/CONTRIBUTING.md">
137+
<Link
138+
rel="noopener"
139+
href="https://github.com/getopenscreen/openscreen/blob/main/CONTRIBUTING.md"
140+
>
136141
<Translate id="footer.community.contributing">Contributing</Translate>
137142
</Link>
138-
<Link href="https://github.com/getopenscreen/openscreen/blob/main/LICENSE">
143+
<Link
144+
rel="noopener"
145+
href="https://github.com/getopenscreen/openscreen/blob/main/LICENSE"
146+
>
139147
<Translate id="footer.community.license">License (MIT)</Translate>
140148
</Link>
141149
<Link href="https://getopenscreen.com/discord/">Discord</Link>

0 commit comments

Comments
 (0)