New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-remark-bitly-links

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-remark-bitly-links

This plugin is going to find all the links in your markdown file, convert them to [bitly](https://bitly.com/) links and mofify the underlying markdown files, replacing all the links with the newly created _bitly_ ones.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by600%
Maintainers
1
Weekly downloads
 
Created
Source

Description

This plugin is going to find all the links in your markdown file, convert them to bitly links and mofify the underlying markdown files, replacing all the links with the newly created bitly ones.

All the links will be available in your bitly dashboard, from where you can see how do they perform.

Dependencies

npm i gatsby-transformer-remark

or

yarn add gatsby-transformer-remark

How to install

npm i gatsby-remark-bitly-links

or

yarn add gatsby-remark-bitly-links

Options

NameRequiredDefaultDescription
accessTokentrue-Bitly API access token, see the bitly docs
namedBitlysfalse["bit.ly", "amzn.to"]Filter out bitly links which have a different domain

Notes

  • In order to identify the source of the links, this plugin will add a tag when creating the link, as you can see it in the bitly docs. This tag is the first 50 characters of the slug parameter from the frontmatter of the markdown file. This means that you have to have a slug value in your frontmatter, or the tag value is not going be populated.

When do I use this plugin?

If you want to track the performance of your links in markdown files, this plugin is the way to go.

Examples of usage

Include this in your gatsby-config.js file, under the gatsby-transformer-remark plugins section.

{
  resolve: "gatsby-transformer-remark",
  options: {
    plugins: [{
      resolve: "gatsby-remark-bitly-links",
      options: {
        accessToken: BITLY_ACCESS_TOKEN, // see the options sections for how to get the token
        namedBitlys: ["mzl.la"] // optional
      }
    }]
  }
}

How to run tests

Tests are still work in progres...

How to contribute

If you have any questions, please open an issue and we will figure it out!

Keywords

FAQs

Package last updated on 18 Sep 2019

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