Comments (12)
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.
@keithmifsud I haven't started work yet.
from jekyll-target-blank.
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.
@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.
- 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.
- I would say
- 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.
- If this library can be selected on site, the same request will be created with the
from jekyll-target-blank.
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.
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.
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.
I would love to have this too!
from jekyll-target-blank.
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.
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 therel
attribute and individual attributes?
Hi @kenchan0130 is this message meant for me or for @jmankoff ?
from jekyll-target-blank.
Hi @keithmifsud, this message is mainly for you.
from jekyll-target-blank.
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)
- 1.2.0 doesn't work with Jekyll v4 HOT 3
- Define path on own domain as external links HOT 3
- In 2.0.0: undefined method `match?' for "/":String (NoMethodError) HOT 2
- css tag for *not* modifying external links HOT 2
- Error: bad URI(is not URI?): http://localhost:4000 HOT 7
- Plugin isnβt working HOT 22
- _config file must have the url entry HOT 3
- do not ovewrite custom attributes e.g. {:rel="sponsored"} HOT 8
- Be able to exclude some pages
- Make the plugin work with Markdown only HOT 1
- Remove rel="noopener noreferrer" from default config HOT 2
- Intel Mac -- Arm64 Nokogiri... HOT 1
- Plugin not working unless the gem is added to the group :jekyll_plugins section HOT 3
- Not working (with Github Pages) HOT 1
- exclude specific external links HOT 2
- Remove CI checks so that we can merge the PRs. HOT 1
- Cannot build Jekyll site HOT 7
- Not working when URL constructed from site data HOT 3
- Causes HTML named character entities to be rendered incorrectly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jekyll-target-blank.