Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Feb 16, 2022
1 parent eb055b3 commit a959970
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
* URL to hosted Git.
* If `repository` is nullish, the Git origin remote is detected.
* If the repository resolves to something npm understands as a Git host such
* as GitHub, GitLab, or Bitbucket, full URLs to that host (say,
* `https://github.com/remarkjs/remark-validate-links/readme.md#install`) can
* as GitHub, GitLab, or Bitbucket, then full URLs to that host (say,
* <https://github.com/remarkjs/remark-validate-links/blob/main/readme.md#install>) can
* also be checked.
* If `repository` resolves to a branch (e.g. <https://github.com/remarkjs/remark-validate-links.git#main>) then links to other branches are ignored --- otherwise the plugin checks links to all branches as if they pointed to the current branch.
* When the repository is automatically detected it checks links to all branches.
* If you’re not in a Git repository, you must pass `repository: false`
* explicitly.
* @property {string} [root]
Expand Down
10 changes: 8 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,14 @@ URL to hosted Git (`string?` or `false`).
If `repository` is nullish, the Git origin remote is detected.
If the repository resolves to something [npm understands][package-repository] as
a Git host such as GitHub, GitLab, or Bitbucket, then full URLs to that host
(say, `https://github.com/remarkjs/remark-validate-links/readme.md#install`) can
also be checked.
(say,
<https://github.com/remarkjs/remark-validate-links/blob/main/readme.md#install>)
can also be checked.
If `repository` resolves to a branch (e.g.
<https://github.com/remarkjs/remark-validate-links.git#main>) then links to
other branches are ignored --- otherwise the plugin checks links to all branches
as if they pointed to the current branch.
When the repository is automatically detected it checks links to all branches.
If you’re not in a Git repository, you must pass `repository: false`
explicitly.

Expand Down

0 comments on commit a959970

Please sign in to comment.