feat: mark external links and open them in a new tab - #6
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EXT_ATTRSconstant (target="_blank" rel="external noopener") insrc/layout.mjs, reused by the site chrome, landing, license, impressum and the docs renderer inbuild.mjs.\FE0E) is appended through an opt-inext-markclass, 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 landingdist/flashtrace.mjsraw-download link and the license "Learn more about the Apache License 2.0" link.flashtrace/flashtracedocs markdown if external links ever appear there (none exist today).Testing
pnpm buildpasses (13 pages, flashtrace v0.8.0).dist/:rel="external noopener"present on all external links across all 13 pages;ext-markcounts match the intended list exactly (2 footer marks per page, +1 each on landing, license and impressum).🤖 Generated with Claude Code