Skip to content

cusxio/metalsmith-github-markdown

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

metalsmith-github-markdown

Build Status

Convert markdown with Github Markdown

Why ?

GitHub has the best syntax highlighting. Nothing beats it.

Usage

$ npm install --save-dev metalsmith-github-markdown

Example

GitHub's Markdown API has a rate-limit of 60 requests per hour for unauthenticated request.

Therefore, by default, this plugin is rate limited to 60 requests per hour. You can increase this to 5000 requests per hour by adding your personal GitHub API token.

import metalsmith from 'metalsmith'
import markdown from 'metalsmith-github-markdown';

const accessToken = process.env.ACCESS_TOKEN;

metalsmith(__dirname)
    .use(markdown({
        accessToken: accessToken, // GitHub API Token.
    }))
    .build((err) => {
        if (err) {
            process.exit(1);
        }

        console.log('Success !');
    });

API

markdown([options])

options

Type: Object

accessToken

Type: String

Default: undefined

License

MIT © Jonathan Chan

About

Convert markdown with Github Markdown

Resources

License

Stars

Watchers

Forks

Packages

No packages published