hugo-PaperMod
hugo-PaperMod copied to clipboard
[FEATURE] optional special handling of external links
What does this PR change? What problem does it solve?
This PR proposes a way to optionally open external links to a new tab, and optionally mark external links with an icon.
Was the change discussed in an issue or in the Discussions before?
Closes #1612.
PR Checklist
- [ ] This change adds/updates translations and I have used the template present here.
- [x] I have enabled maintainer edits for this PR.
- [x] I have verified that the code works as described/as intended.
- [ ] This change adds a Social Icon which has a permissive license to use it.
- [x] This change does not include any CDN resources/links.
- [x] This change does not include any unrelated scripts such as bash and python scripts.
- [x] This change updates the overridden internal templates from HUGO's repository.
Screenshots
Dark mode: , Light mode:
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
We already do this with external links in menu https://adityatelange.github.io/hugo-PaperMod/
We already do this with external links in menu https://adityatelange.github.io/hugo-PaperMod/
Ah cool! So how do you feel about this PR? It brings two differences:
- The icon is pure CSS, no SVG involved, so it's more lightweight and with better accessibility (screen readers won't try to read the image)
- The ability to open external links in a new tab is added through a site-level option
Let me know if you think this should be implemented another way. Or if you think this implementation should be applied to what already exists in the header menu.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
