jekyll-target-blank icon indicating copy to clipboard operation
jekyll-target-blank copied to clipboard

do not ovewrite custom attributes e.g. {:rel="sponsored"}

Open evodify opened this issue 4 years ago • 7 comments

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.

evodify avatar Dec 20 '20 17:12 evodify

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:

keithmifsud avatar Jan 19 '21 05:01 keithmifsud

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

xplosionmind avatar Mar 19 '21 09:03 xplosionmind

Hi @xplosionmind :smile:

I'm also looking forward to the next release :smile:

I'll try to fit this in asap.

keithmifsud avatar Mar 23 '21 15:03 keithmifsud

Hello @keithmifsud, do you have any ETA?

xplosionmind avatar May 14 '21 06:05 xplosionmind

Hello, @keithmifsud, any news?

xplosionmind avatar Oct 30 '21 10:10 xplosionmind

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 avatar Nov 01 '21 02:11 keithmifsud

@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>.

prplecake avatar Feb 05 '22 13:02 prplecake

I now use https://github.com/twinsunllc/jekyll-link-attributes instead; works like a charm.

zsteinmetz avatar Nov 01 '22 17:11 zsteinmetz