List Github Contributors Plugin
This markdown-magic will list out the contributors of your repository.
Install
npm i markdown-magic markdown-magic-github-contributors --save-dev
Usage
1. Add markdown-magic transform script
/* generate-docs.js */const fs = const path = const markdownMagic = const config = transforms: CONTRIBUTORS: const markdownPath = path
2. Add comment block in markdown
<!-- ⛔️ AUTO-GENERATED-CONTENT:START (CONTRIBUTORS) -->table will be placed here<!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
3. Add docs build script to package.json
This is an option step but will allow you to generate docs easily with npm run docs
"scripts":
Options
repo
(string) (optional) - username/repoName
. Will use the current working directory git remote origin as a default.
format
(string) (optional) - Default is table. possible values: list
, aligned
, & table
. See example
Setting options
Global configuration
You can configure the plugin when required in as a tranform. This will apply to all instances of the <!-- ⛔️ AUTO-GENERATED-CONTENT (CONTRIBUTORS) -->
comment, unless overriden inline.
const fs = const path = const markdownMagic = const config = transforms: CONTRIBUTORS: format: 'list' const markdownPath = path
Inline configuration
You can override global config settings with inline options like so:
<!-- ⛔️ AUTO-GENERATED-CONTENT:START (CONTRIBUTORS:format=list) -->table will be placed here<!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
Prior Art
Many thanks to jonschlinkert and his github-contributors package that powers this under the hood.