SSWConsulting / SSW.Rules

Generator for ssw.com.au/rules
https://www.ssw.com.au/rules
MIT License
13 stars 13 forks source link

🐛 Bug - Google juice is precious... Don't share it with non-SSW websites #1155

Open GordonBeeming opened 10 months ago

GordonBeeming commented 10 months ago

Cc: @JackDevAU @BrookJeynes

Hi

Describe the Bug

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to
  2. Inspect any link of the page

image Figure: External links sharing our precious Google juice, taken from https://www.ssw.com.au/rules/use-pull-request-templates-to-communicate-expectations/

Expected Behavior

External links should have these in the rel tag at a minimum "nofollow noopener external".

Tasks

More Information

I have a script that would do this at runtime, but I'm sure we can do this during the build phase of for the content

https://github.com/GordonBeeming/GordonBeemingCom/blob/main/src/GordonBeemingCom/wwwroot/js/site.js

https://gordonbeeming.com/

Note: in my case I redirect to a handler file first and then off the site, this transform can be skipped for SSW Rules as all we want to do is not share the SEO love with other sites

Screenshots

Thanks!

BrookJeynes commented 7 months ago

Initially to solve this we used the gatsby-remark-external-links plugin and managed to get all external links having "nofollow noopener external". Unfortunately, this also counted for any external SSW links that weren't relative to rules. The plugin does not allow us to specify domains to ignore.

As per my conversation with @JackDevAU, we time boxed forking and modifying the gatsby plugin to two hours and didn't succeed. Parking until SSW.RulesV2