Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding target blank noopener noreferrer to navLinks #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pietrop
Copy link

@pietrop pietrop commented Jan 21, 2022

I'd suggest adding target="_blank" rel="noopener noreferrer" to the nav links, since these are generally used for external links, it might be good if they open in a new window?

 <?js if(betterDocs.navLinks && betterDocs.navLinks.length) { ?> 
                    <?js betterDocs.navLinks.forEach(function(link) { ?>
                        <a
                            class="link user-link <?js= link.className ? link.className : '' ?>"
                            href="<?js= link.href ?>"
+                             target="_blank" rel="noopener noreferrer" 
                        >
                            <?js= link.label ?>
                        </a>
                    <?js }) ?>
                <?js } ?>

noopener noreferrer
@pietrop pietrop changed the title adding target blank noopener noreferrer adding target blank noopener noreferrer to navLinks Jan 21, 2022
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.

1 participant