Skip to content

[codex] add rel to external card links#649

Open
Sean-Kenneth-Doherty wants to merge 1 commit into
firstcontributions:mainfrom
Sean-Kenneth-Doherty:codex/add-external-link-rel
Open

[codex] add rel to external card links#649
Sean-Kenneth-Doherty wants to merge 1 commit into
firstcontributions:mainfrom
Sean-Kenneth-Doherty:codex/add-external-link-rel

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

Summary

  • add rel="noopener noreferrer" to project-card links that open repository pages in a new tab
  • add the same protection to issue-preview links that open GitHub issues in a new tab

Why

These links already use target="_blank"; adding rel prevents the newly opened page from retaining access to the opener context and clears the remaining source-level new-tab link gap.

Validation

  • rg -n "target=\"_blank\"(?![^>]*rel=)|target='_blank'(?![^>]*rel=)" src --pcre2 returned no matches
  • GITHUB_TOKEN=$(gh auth token) pnpm build
  • generated dist/index.html check found 168 target="_blank" links and 0 missing noopener/noreferrer

@Sean-Kenneth-Doherty
Copy link
Copy Markdown
Author

Validation pass for this branch:

  • Confirmed the only source changes are in src/components/ProjectCard.astro and src/components/IssueList.astro.
  • Ran rg -n "target=\"_blank\"(?![^>]*rel=)|target='_blank'(?![^>]*rel=)" src --pcre2; it returned no matches.
  • Ran GITHUB_TOKEN=... pnpm build; Astro built both routes successfully.
  • Checked generated dist/index.html: 168 target=\"_blank\" links, 0 missing noopener/noreferrer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant