Repository navigation
feat: open content links in a new tab - #192
Merged
Merged
Conversation
✅ Deploy Preview for masterpoint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Gowiem
reviewed
Oct 23, 2026
| {{- $u := urls.Parse .Destination -}} | ||
| {{- $newTab := and (not (strings.HasPrefix .Destination "#")) (in (slice "" "http" "https") $u.Scheme) -}} | ||
| {{- $external := and $u.Host (ne $u.Host (urls.Parse site.BaseURL).Host) -}} | ||
| <a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $newTab }} target="_blank"{{ end }}{{ if $external }} rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}</a> |
Member
There was a problem hiding this comment.
Do we know why using rel noreferrer is the move? I would want us to show up as a referrer to Spacelift links for example since I want them to see that we're pushing content their way.
Gowiem
previously approved these changes
Oct 23, 2026
Gowiem
left a comment
Member
There was a problem hiding this comment.
One question, but otherwise this looks solid.
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.

What
Promotes the case-studies link render hook to a site-wide default (
layouts/_default/_markup/render-link.html), so Markdown links open in a new tab across blog, careers, and all other pages.rel="noopener"only (nonoreferrer, so linked sites like Spacelift see masterpoint.io as the referrer)#section) andmailto:/tel:→ same tabTemplate-built links (nav, footer, cards) are unaffected.