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

Feature Request: rel="noopener/noreferrer/nofollow" option on external links #695

Closed
lukehsiao opened this issue May 26, 2019 · 3 comments
Closed
Labels
done in pr Already done in a PR enhancement

Comments

@lukehsiao
Copy link
Contributor

lukehsiao commented May 26, 2019

Feature Request

This feature request is similar to #681. In Hugo, we can configure the markdown parser (blackfriday) to include rel attributes like nofollow and noreferrer in order to inform crawlers or prevent leaking referrer information. It has also been shown that rel="noopener" can be useful in preventing websites from manipulating the window object of a document.

It would be great to be able to include flags to enable or disable the inclusion of these rel attributes for markdown links, similar to how #681 seeks to enable or disable including target="_blank" with these markdown links.

I'd also point out that Hugo currently does not support rel="noopener" (it is supported by blackfriday v2, but hugo is still using blackfriday v1), so adding this support would be a nice advantage for zola.

@lukehsiao lukehsiao changed the title Feature Request: rel noopener/noreferrer/nofollow on links Feature Request: rel="noopener/noreferrer/nofollow" option on external links May 26, 2019
@Keats
Copy link
Collaborator

Keats commented May 26, 2019

Good idea! I've linked to it from #681, I'll leave this open for now but ideally it will be built in the same PR as 681

@flatlandy
Copy link

Does the "external_links_no_follow" variable apply to external URL's specified within the frontmatter redirect_to variable?

I am using the redirect_to functionality to create "pretty" outbound links similar to website.com/out/amazon which would redirect to amazon.com/[affiliate code]. As you can imagine, it would be best to have these set to nofollow.

@Keats
Copy link
Collaborator

Keats commented Mar 1, 2024

No it doesn't because we are using HTML redirects for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done in pr Already done in a PR enhancement
Projects
None yet
Development

No branches or pull requests

3 participants