npm install remark-github
Say we have the following file,
Some references:* Commit: f8083175fe890cbf14f41d0a06e7aa35d4989587* Commit (fork): foo@f8083175fe890cbf14f41d0a06e7aa35d4989587* Commit (repo): remarkjs/remark@e1aa9f6c02de18b9459b7d269712bcb50183ce89* Issue or PR (`#`): #1* Issue or PR (`GH-`): GH-1* Issue or PR (fork): foo#1* Issue or PR (project): remarkjs/remark#1* Mention: @wooormSome links:* Commit: <>* Commit comment: <>* Issue or PR: <>* Issue or PR comment: <>* Mention: <>
And our script,
example.js, looks as follows:
var vfile =var remark =var github =
node example yields:
Some references:* Commit:* Commit (fork):* Commit (repo):* Issue or PR (`#`):* Issue or PR (`GH-`):* Issue or PR (fork):* Issue or PR (project):* Mention:Some links:* Commit:* Commit comment:* Issue or PR:* Issue or PR comment:* Mention: <>
Automatically link references to commits, issues, pull-requests, and users, like in GitHub issues, PRs, and comments (see Writing on GitHub).
- Commits across forks:
- Commits across projects:
- Prefix issues:
- Hash issues:
- Issues across forks:
- Issues across projects:
These links are generated relative to a project.
In Node this is detected automatically by loading
package.json and looking for
In the browser, or when overwriting this, you can pass a
The value of
repository should be a URL to a GitHub repository, such as
'https://github.com/user/project.git', or only
By default, mentions are wrapped in
strong nodes (that render to
HTML), to simulate the look of mentions on GitHub.
However, this creates different HTML markup, as the GitHub site applies these
styles using CSS.
mentionStrong: false to turn off this behavior.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.