This package has been deprecated

Author message:

mdast-contributors has been renamed to remark-contributors. More info: https://github.com/wooorm/remark/releases/tag/3.0.0

mdast-contributors

1.0.2 • Public • Published

mdast-contributors

mdast-contributors has been renamed to remark-contributors in light of mdast's rename to remark.

mdast plugin to inject a given list of contributors into a table in a markdown file.

Safe to be run on your README.md file before each commit without creating unnecessary noise!

Usage

NPM

Used as a plugin for mdast like so:

const plugin = require('mdast-contributors')
const mdast  = require('mdast')
 
readme = mdast.use(plugin, {
  contributors: [
    {
      name: 'Hugh Kennedy',
      twitter: 'hughskennedy',
      github: 'hughsk'
    }
  ]
}).process(readme)

This will add a "Contributors" section to your document if one is not already present. If one is present, a list of contributors will be added to that section.

For example, the following input markdown:

My Readme
 
Hello World!

Would yield:

My Readme
 
Hello World!
 
## Contributors
 
| Name             | GitHub                              | Twitter                                           |
| ---------------- | ----------------------------------- | ------------------------------------------------- |
**Hugh Kennedy** | [hughsk](https://github.com/hughsk) | [@hughskennedy](https://twitter.com/hughskennedy) |

Any other text in the contributors section will still be preserved, so you can still include appreciative personal gratitude of your choosing.

options.contributors

Required. An array of contributors, each with the following properties:

  • name: the preferred name of the contributor.
  • github: the GitHub account of the contributor.
  • twitter: the Twitter account of the contributor, with or without an @.

License

MIT. See LICENSE.md for details.

Contributors

Name GitHub Twitter
Hugh Kennedy hughsk @hughskennedy

Package Sidebar

Install

npm i mdast-contributors

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • hughsk
  • wooorm