Skip to content

feat: mark external links and open them in a new tab - #6

Merged
MentorFilou merged 2 commits into
mainfrom
feat/external-link-marker
Jul 18, 2026
Merged

feat: mark external links and open them in a new tab#6
MentorFilou merged 2 commits into
mainfrom
feat/external-link-marker

Conversation

@MentorFilou

Copy link
Copy Markdown
Member

Summary

  • Every link leaving the site now opens in a new tab via a shared EXT_ATTRS constant (target="_blank" rel="external noopener") in src/layout.mjs, reused by the site chrome, landing, license, impressum and the docs renderer in build.mjs.
  • A small "↗" marker (text presentation enforced via \FE0E) is appended through an opt-in ext-mark class, applied where a plain text link doesn't already make the external destination obvious: footer GitHub and Discussions, the impressum "the flashtrace team" link, the landing dist/flashtrace.mjs raw-download link and the license "Learn more about the Apache License 2.0" link.
  • Deliberately unmarked (but still new-tab): the version badge, the "View on GitHub" hero button, the icon-only topbar GitHub link and docs-rendered external links — arrows for the latter belong in the upstream flashtrace/flashtrace docs markdown if external links ever appear there (none exist today).

Testing

  • pnpm build passes (13 pages, flashtrace v0.8.0).
  • Verified in dist/: rel="external noopener" present on all external links across all 13 pages; ext-mark counts match the intended list exactly (2 footer marks per page, +1 each on landing, license and impressum).

🤖 Generated with Claude Code

MentorFilou and others added 2 commits July 18, 2026 03:32
All links leaving the site now share EXT_ATTRS (target="_blank"
rel="external noopener"); site.css appends a small text-presentation
arrow to every such link except icon-only ones like the topbar GitHub
button. Covers the site chrome, landing, license, impressum and all
external links in rendered docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
target="_blank" stays on every external link, but the arrow marker now
only appears where it earns its keep: the footer links, the impressum
team link, the raw dist/flashtrace.mjs download and the license
learn-more link. The version badge, the "View on GitHub" button and
docs-rendered links stay unmarked.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MentorFilou
MentorFilou merged commit 55cf162 into main Jul 18, 2026
1 check passed
@MentorFilou
MentorFilou deleted the feat/external-link-marker branch July 18, 2026 02:23
@MentorFilou MentorFilou self-assigned this Jul 20, 2026
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