Closed skrings closed 5 years ago
You're welcome @skrings :smile:
I'm not sure I understood the question.
You can configure the plugin to only add the target attribute to links which have a certain CSS class name. You can also which rel attribute values to add if you don't want the default.
Have your read the README file? https://github.com/keithmifsud/jekyll-target-blank
Hey @keithmifsud
My goal is to add rel=noopener
attribute to all external links in order to secure these links.
For this I am missing a feature where the plugin selects all anchor tags by the presence of target="_blank"
attribute and adds rel=noopener
attribute (with the configured values).
If I configure a certain CSS class all anchor tags with this CSS class will get the attributes target="_blank"
and rel=noopener
. But potentially there are anchor tags without the CSS class but with target="_blank"
.
It seems like this plugin https://github.com/d-ogarkov/jekyll-extlinks is exactly doing what I want.
Thanks for letting me know. I believe that JekyllTargetBlank already features your requirements. rel
attributes are added automatically to all external links (links outside your site's domain). You can also specify other rel
values in _config
.
Please let me know if I'm missing anything, however, I am glad that you have found another plugin which may be more suited to your use case :)
Thanks for the handy plugin 👍
If would love to have a feature where I am able to configure that the attribute
rel="noopener noreferrer"
should be added to all links withtarget="blank"
. So my goal is to add therel
attribute where needed and not to specify thetarget
attribute for all external link.This way you are able to control which links are opened in a new tab and these links are secured automatically because the plugin adds the
rel
attribute with the configured values.