Skip to content

feat: open content links in a new tab - #192

Merged
oycyc merged 6 commits into
mainfrom
feat/external-links-new-tab
Oct 23, 2026
Merged

oycyc merged 6 commits into
mainfrom
feat/external-links-new-tab

Conversation

@oycyc

@oycyc oycyc commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

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.

  • Internal and external links → new tab
  • External links get rel="noopener" only (no noreferrer, so linked sites like Spacelift see masterpoint.io as the referrer)
  • Same-page anchors (#section) and mailto:/tel: → same tab

Template-built links (nav, footer, cards) are unaffected.

@oycyc
oycyc requested a review from a team as a code owner October 23, 2026 16:05
@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for masterpoint ready!

Name Link
🔨 Latest commit 75ba637
🔍 Latest deploy log https://app.netlify.com/projects/masterpoint/deploys/6adb8bba152be1ed2cd4afa5
😎 Deploy Preview https://deploy-preview-192--masterpoint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 40
Accessibility: 89
Best Practices: 83
SEO: 81
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f71b46a-4ed5-4513-b9b1-a1f4dce0a835
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

{{- $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>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Gowiem previously approved these changes Oct 23, 2026

@Gowiem Gowiem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but otherwise this looks solid.

@oycyc
oycyc merged commit f012d9b into main Oct 23, 2026
8 checks passed
@oycyc
oycyc deleted the feat/external-links-new-tab branch October 23, 2026 16:39
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.

2 participants