Why should I use use this?
verb-reflinks makes it easy to write documentation that references other libraries, by simply adding the name, like [foo][], without having to remember or write the entire URL to the GitHub repository.
Use as a .postRender or .preWrite middleware.
var reflinks = require('{%= name %}');
var verb = require('verb');
var app = verb();
app.postRender(/\.md$/, reflinks());What does this do?
- Finds reflinks like
[gulp][]or[gulp] - Resolves the
homepageorrepository.urlfrom the npm package name, if available - Appends the resolved reflink, like
[gulp]: http://gulpjs.com, to the markdown string if it does not already exist somewhere in the document
Must be a valid npm name
For reflinks to be fixed, the reflink text must match the name of a valid npm package. For example [Foo Bar][] won't be resolved, but [gulp][] would.