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

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

Closed
evodify opened this issue Dec 20, 2020 · 8 comments · Fixed by #67
Closed

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

evodify opened this issue Dec 20, 2020 · 8 comments · Fixed by #67
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@evodify
Copy link

evodify commented Dec 20, 2020

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.

@keithmifsud keithmifsud self-assigned this Jan 19, 2021
@keithmifsud keithmifsud added the enhancement New feature or request label Jan 19, 2021
@keithmifsud keithmifsud added this to the Release v2.1 milestone Jan 19, 2021
@keithmifsud
Copy link
Owner

keithmifsud commented Jan 19, 2021

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 😄

@xplosionmind
Copy link

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

@keithmifsud
Copy link
Owner

Hi @xplosionmind 😄

I'm also looking forward to the next release 😄

I'll try to fit this in asap.

@xplosionmind
Copy link

Hello @keithmifsud, do you have any ETA?

@xplosionmind
Copy link

Hello, @keithmifsud, any news?

@keithmifsud
Copy link
Owner

HI @xplosionmind ...sorry.. no news 😞

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

@prplecake
Copy link
Contributor

@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 added a commit to prplecake/jekyll-target-blank that referenced this issue Feb 5, 2022
prplecake added a commit to prplecake/jekyll-target-blank that referenced this issue Mar 11, 2022
@zsteinmetz
Copy link

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

prplecake added a commit to prplecake/jekyll-target-blank that referenced this issue Apr 17, 2023
keithmifsud added a commit that referenced this issue Apr 18, 2023
Fixes #54: do not overwrite custom attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants