Giter Site home page Giter Site logo

trendingtechnology / react-link-filter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roast-cms/react-link-filter

0.0 0.0 0.0 60 KB

⚗️ Treat your `<NavLink />` components for better SEO and UX.

License: Mozilla Public License 2.0

JavaScript 100.00%

react-link-filter's Introduction

react-link-filter

NPM version

⚗️ Treat your <NavLink /> components for better SEO and UX.

  • Opens all external links in a new tab/window with rel="nofollow noopener noreferrer" (thus giving your users more browsing security and stopping you from loosing your SEO juice).
  • Adds title attribute to all external links and anchor links to help your users understand what they're getting into, without cluttering your internal links.
  • Converts all of your internal links as relative URLs (for better canonical structure).
  • Fixes invalid links, such as google.com => http://google.com
  • Provides makeRelative utility function that can help you turn all of your absolute links within your domain to relative ones.

Installation:

yarn add @roast-cms/react-link-filter

Then, in your project:

<Link to="https://www.analog.cafe" domain="localhost:3002">External website</Link>

For more detailed examples see /examples folder. There you will find a method on how to avoid having to add domain prop every time.

Contributions welcome!

To get started with the code: clone the repo, run yarn install then yarn start and open up http://localhost:3002 in your browser.

react-link-filter's People

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.