Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-external-links

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-external-links

Deprecated: this package is no longer maintained. Please use `remark-rehype` to move from remark (markdown) to rehype (HTML) and then replace `remark-external-links` with [`rehype-external-links`][rehype-external-links].

  • 10.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
decreased by-26.46%
Maintainers
3
Weekly downloads
 
Created

What is remark-external-links?

The remark-external-links package is a plugin for the Remark Markdown processor that automatically modifies links in Markdown files. It is primarily used to add attributes like target and rel to external links, enhancing security and usability without manual HTML tagging.

What are remark-external-links's main functionalities?

Adding attributes to external links

This feature allows users to automatically add specific attributes such as target='_blank' and rel='nofollow noopener noreferrer' to external links in Markdown content. This enhances security by preventing tabnapping and improves SEO through 'nofollow'. The code sample demonstrates how to set up the plugin with Remark to process a simple Markdown string.

const remark = require('remark');
const html = require('remark-html');
const externalLinks = require('remark-external-links');

remark()
  .use(externalLinks, {target: '_blank', rel: ['nofollow', 'noopener', 'noreferrer']})
  .use(html)
  .process('Check out [Google](https://google.com)!', function (err, file) {
    console.log(String(file));
  });

Other packages similar to remark-external-links

FAQs

Package last updated on 01 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc