chore: minor styling tweaks for the urls used in blogs#391
Open
amaan-bhati wants to merge 12 commits into
Open
chore: minor styling tweaks for the urls used in blogs#391amaan-bhati wants to merge 12 commits into
amaan-bhati wants to merge 12 commits into
Conversation
Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a two-layer strategy to reduce outbound clicks from blog posts while keeping external citations in the HTML for SEO: external links are visually de-emphasized/disabled via CSS, and a content-rewrite step adds target="_blank" (+ rel) as a fallback when CSS is stripped.
Changes:
- Adjusts link styling rules so keploy/relative/anchor links remain visibly clickable, while external
http(s)links look like plain text and ignore pointer events. - Adds a content-processing pass to inject
target="_blank"andrel="noopener noreferrer"onto external links that don’t already specify a target. - Attempts to merge
noopener noreferrerinto existingrelattributes rather than overwriting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| components/post-body.tsx | Adds a regex-based anchor-tag rewrite to set target="_blank"/rel for external links. |
| components/post-body.module.css | Reworks .content a[...] selectors to visually disable external links while keeping internal links styled/clickable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
… behaviour Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
…ailto/tel colour Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
… internal CSS selectors Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
…-visible for external links Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
…e-tabnabbing Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
…ute hrefs Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
…e checks, i flag on mailto/tel CSS selectors Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
… protocol-relative URLs only Signed-off-by: amaan-bhati <amaanbhati49@gmail.com>
nehagup
approved these changes
Jun 6, 2026
| .content a:hover { | ||
| /* keploy.io (absolute), relative paths, same-page anchors, mailto/tel — orange and clickable */ | ||
| .content a[href*="keploy.io" i], | ||
| .content a[href^="/"]:not([href^="//"]), |
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.
Minor styling changes to style the interactions and ux of the urls used in blogs