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

@nd0ut/remark-bookmarks

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nd0ut/remark-bookmarks

A link manager for Markdown files.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

remark-bookmarks

Build Coverage Downloads Chat Sponsors Backers

Link manager for Markdown files with remark.

Installation

npm:

npm install remark-bookmarks

Usage

This module allows you to manage a collection of links across Markdown files; it’s useful for use cases where you need to reference the same source several times across multiple sections of your documentation. Given the following markdown:

remark-bookmarks is on [npm]!

And we require dependencies:

const remark = require('remark')
const remarkBookmarks = require('remark-bookmarks')

We can call remark-bookmarks to provide the missing reference:

const output = remark()
  .use(remarkBookmarks, {
    bookmarks: {
      github: 'https://github.com/remarkjs/remark-bookmarks',
      npm: 'https://npmjs.com/package/remark-bookmarks'
    }
  })
  .processSync('remark-bookmarks is on [npm]!')
  .toString()

The output of this transform is below.

Note that only the npm link is inserted into this document, to avoid unnecessary references.

remark-bookmarks is on [npm]!

[npm]: https://npmjs.com/package/remark-bookmarks

API

remark.use(bookmarks[, options])

Manage links.

By default, this module will append all of the references to the bottom of the Markdown file, which might be problematic if you are using modules that change whole sections of Markdown. One such example is remark-license.

To resolve this, we recommend that you use remark-inline-links, which will transform the references into inline links.

options.bookmarks

The URLs to share across Markdown documents (Object.<string>). References are case insensitive.

options.overwrite

Pass overwrite: true to ensure that references are used consistently. By default (false), the existing references in the file will take precedence over anything defined globally.

  • remark-inline-links — Transform references and definitions into normal links and images
  • remark-defsplit — Transform links and images into references and definitions with URI-based identifiers
  • remark-reference-links — Transform links and images into references and definitions
  • remark-unlink — Remove all links, references and definitions

Contribute

See contributing.md in remarkjs/remark for ways to get started.

This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Ben Briggs

Keywords

FAQs

Package last updated on 06 Feb 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