All Projects → remarkjs → remark-bookmarks

remarkjs / remark-bookmarks

Licence: MIT license
plugin to manage links

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to remark-bookmarks

remark-external-links
Legacy plugin to automatically add target and rel attributes to external links — please use `rehype-external-links` instead
Stars: ✭ 50 (+233.33%)
Mutual labels:  remark, link, remark-plugin
remark-autolink-headings
Legacy remark plugin to automatically add links to headings — please use `rehype-autolink-headings` instead
Stars: ✭ 63 (+320%)
Mutual labels:  remark, link, remark-plugin
remark-slate-transformer
remark plugin to transform remark syntax tree (mdast) to Slate document tree, and vice versa. Made for WYSIWYG markdown editor.
Stars: ✭ 62 (+313.33%)
Mutual labels:  remark, remark-plugin
remark-license
plugin to generate a license section
Stars: ✭ 15 (+0%)
Mutual labels:  remark, remark-plugin
remark-footnotes
Legacy plugin to add support for pandoc footnotes — please use `remark-gfm` instead
Stars: ✭ 38 (+153.33%)
Mutual labels:  remark, remark-plugin
remark-hint
Sprinkle hints/tips/warnings on your documents
Stars: ✭ 36 (+140%)
Mutual labels:  remark, remark-plugin
remark-embed-images
plugin to embed local images as data URIs
Stars: ✭ 23 (+53.33%)
Mutual labels:  remark, remark-plugin
remark-behead
Remark plugin to increase or decrease markdown heading weight.
Stars: ✭ 14 (-6.67%)
Mutual labels:  remark, remark-plugin
transformer-oembed
@remark-embedder transformer for oEmbed supported links
Stars: ✭ 25 (+66.67%)
Mutual labels:  remark, remark-plugin
remark-man
plugin to compile markdown to man pages
Stars: ✭ 87 (+480%)
Mutual labels:  remark, remark-plugin
remark-highlight.js
Legacy plugin to highlight code blocks with highlight.js — please use `rehype-highlight` instead
Stars: ✭ 58 (+286.67%)
Mutual labels:  remark, remark-plugin
remark-frontmatter
remark plugin to support frontmatter (YAML, TOML, and more)
Stars: ✭ 167 (+1013.33%)
Mutual labels:  remark, remark-plugin
cache
A cache for @remark-embedder
Stars: ✭ 12 (-20%)
Mutual labels:  remark, remark-plugin
remark-admonitions
Add admonitions support to Remarkable
Stars: ✭ 90 (+500%)
Mutual labels:  remark, remark-plugin
Remark Reference Links
plugin to transform links and images into references and definitions
Stars: ✭ 8 (-46.67%)
Mutual labels:  reference, link
Remark Defsplit
plugin to change links and images to references with separate definitions
Stars: ✭ 7 (-53.33%)
Mutual labels:  reference, link
Shaarli Material
Shaarli Material is a theme for Shaarli, the famous personal, minimalist, super-fast, database free, bookmarking service.
Stars: ✭ 228 (+1420%)
Mutual labels:  bookmark, link
SmartReplace
Unity plug-in for replacing scene objects while keeping their references.
Stars: ✭ 50 (+233.33%)
Mutual labels:  reference, link
twoslash
You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible static code samples
Stars: ✭ 596 (+3873.33%)
Mutual labels:  remark, remark-plugin
strip-markdown
plugin remove Markdown formatting
Stars: ✭ 84 (+460%)
Mutual labels:  remark, remark-plugin

remark-bookmarks

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin to manage links.

Archived

This project is now archived. A new parser in remark happened, which is 100% compliant to CommonMark. Which means the things this plugin used are no longer available. Rewriting this plugin would be a lot of work, and while it’s a fun idea, this plugin wasn’t used much, and hence I am instead archiving it.

Install

npm:

npm install remark-bookmarks

Use

Say we have the following file, example.md:

`remark-bookmarks` is on [npm][]!

And our script, example.js, looks as follows:

const vfile = require('to-vfile')
const remark = require('remark')
const bookmarks = require('remark-bookmarks')

remark()
  .use(bookmarks, {
    bookmarks: {
      github: 'https://github.com/remarkjs/remark-bookmarks',
      npm: 'https://npmjs.com/package/remark-bookmarks'
    }
  })
  .process(vfile.readSync('example.md'), function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Now, running node example yields:

`remark-bookmarks` is on [npm][]!

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

API

remark().use(bookmarks[, options])

Manage links.

options
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.

Security

options.bookmarks is used and injected into the tree as definitions when the content references them. This could open you up to a cross-site scripting (XSS) attack if you pass user provided content as bookmarks.

This may become a problem if the Markdown later transformed to rehype (hast) or opened in an unsafe Markdown viewer.

Related

  • 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/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Ben Briggs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].