jekyll-target-blank
jekyll-target-blank copied to clipboard
do not ovewrite custom attributes e.g. {:rel="sponsored"}
Great plugin! Thanks for creating it.
Please, add a setting to skip manually set attributes.
For example, sometimes I publish sponsored links written in markdown as:
[some text](https://www.sposnsor.com/){:rel="sponsored"}
jekyll-target-blank would remove rel="sponsored"
and add the default target="_blank" rel="noopener"
. This is not a desirable behavior. It should be target="_blank" rel="sponsored noopener"
instead.
Sorry, I do not know how to develop a jekyll plugin, so I cannot PR this feature.
Hi @evodify ..You're welcome and thank you for this suggestion. I will add this feature in a future release. Meanwhile, kindly note that you should be able to add your rel attributes using HTML such as <a href="#" rel="sponsor">Sponsor</a>
. The plugin will add to the existing rel and not overwrite it :smile:
Hello, I am struggling with the same problem. There could be some temporary solutions, like excluding some pages (#55) or making the plugin work only for Markdown links (#56).
Looking forward to the next release 😍🚀
Best,
T
Hi @xplosionmind :smile:
I'm also looking forward to the next release :smile:
I'll try to fit this in asap.
Hello @keithmifsud, do you have any ETA?
Hello, @keithmifsud, any news?
HI @xplosionmind ...sorry.. no news :disappointed:
Meanwhile, kindly note that you should be able to add your rel attributes using HTML such as Sponsor. The plugin will add to the existing rel and not overwrite it smile
@keithmifsud That's not the case. My HTML link in source is along the lines of <a rel="me" href="...">...</a>
, but when built, the link becomes <a rel="noopener" href="...">...</a>
.
I now use https://github.com/twinsunllc/jekyll-link-attributes instead; works like a charm.