Giter Club home page Giter Club logo

Comments (12)

keithmifsud avatar keithmifsud commented on June 13, 2024

Thanks, @kenchan0130 :)

I understand the issue and I'm more than happy to add it on. Have you got a PR for this or you have not started working on it yet?

from jekyll-target-blank.

kenchan0130 avatar kenchan0130 commented on June 13, 2024

@keithmifsud I haven't started work yet.

from jekyll-target-blank.

keithmifsud avatar keithmifsud commented on June 13, 2024

Okies, I'm happy to help you with this feature if you get stuck. It is quite straight forward to implement. However, usage wise, you will need to be careful. In your example, you listed github.com (I know it is just an example), your site will probably have external links to GH. Some f which will to repos you manage and some to repos others manage. This can harm your site's SEO.

from jekyll-target-blank.

kenchan0130 avatar kenchan0130 commented on June 13, 2024

@keithmifsud
I recognize that this library currently doesn't support the nofollow grant itself.
IMO, I think it is necessary to consider the advantages and disadvantages of the following choices.

  1. Whether to support the nofollow attribute
    • I would say nofollow attribute allows us to choose whether to trust external sites. So, "Some f which will to repos you manage and some to repos others manage." is an individual problem of the site, and I think the scope of the discussion is different.
  2. What to do with the default behavior, with support for nofollow attribute. Whether to be selective to end users in config.
    • If this library can be selected on site, the same request will be created with the noreferrer attribute. Therefore, we may want to be careful in supporting these features.

from jekyll-target-blank.

keithmifsud avatar keithmifsud commented on June 13, 2024

Hi @kenchan0130 ,

Currently, you can still add nofollow and any other rel value:

target-blank:
    rel: nofollow

However, as you stated, it is not configurable, at least yet πŸ˜„

I mean you cannot select which links to add the nofollow to. Just all external links or all links with the predefined CSS class.

from jekyll-target-blank.

kenchan0130 avatar kenchan0130 commented on June 13, 2024

We may do the following:

target-blank:
   noopener:
       allow: ["regexp string or pure string"]
       ignore: ["regexp string or pure string"]
   noreferrer:
       allow: ["regexp string or pure string"]
       ignore: ["regexp string or pure string"]
   nofollow:
       allow: ["regexp string or pure string"]
       ignore: ["regexp string or pure string"]

In other words, I propose a method like noopener, noreferrer and nofollow attributes of config support Boolean and Object with Array of String types.

In addition, rel attribute of config may be excluded.

from jekyll-target-blank.

keithmifsud avatar keithmifsud commented on June 13, 2024

I like the idea but I think that the regexp is hard for most and very hard to test against. If you can build the feature in a TDD manner than, please do :)

Please ensure existing functionality remain intact as this library is used by more 10K installs and we should respect no BC.

from jekyll-target-blank.

jmankoff avatar jmankoff commented on June 13, 2024

I would love to have this too!

from jekyll-target-blank.

kenchan0130 avatar kenchan0130 commented on June 13, 2024

If you adopt my proposal, I don't know what to do with rel atrribute.
What behavior do you expect if settings are enabled separately for the rel attribute and individual attributes?

from jekyll-target-blank.

keithmifsud avatar keithmifsud commented on June 13, 2024

If you adopt my proposal, I don't know what to do with rel atrribute.
What behavior do you expect if settings are enabled separately for the rel attribute and individual attributes?

Hi @kenchan0130 is this message meant for me or for @jmankoff ?

from jekyll-target-blank.

kenchan0130 avatar kenchan0130 commented on June 13, 2024

Hi @keithmifsud, this message is mainly for you.

from jekyll-target-blank.

keithmifsud avatar keithmifsud commented on June 13, 2024

Thanks @kenchan0130 :) I don't think I understand the question? You can already set the rel attribute as a separate setting if one wishes to customise its behaviour.

from jekyll-target-blank.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.