0.0.1 • Published 7 years ago

esdoc-plugin-external-links v0.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

esdoc-plugin-external-links

ESDoc plugin to set the target for external links

Installation

npm install --save-dev esdoc-plugin-external-links

Usage

Add the esdoc-plugin-external-links to your ESDoc config...

{
  ...
  "plugins": [
    {
      "name": "esdoc-plugin-external-links",
      "option": ...
    }
  ]
}

Options

The option property can either be an Object...

{
  ...
  "plugins": [
    {
      "name": "esdoc-plugin-external-links",
      "option": {
        ...
      }
    }
  ]
}

or an Array<Object>...

{
  ...
  "plugins": [
    {
      "name": "esdoc-plugin-external-links",
      "option": [
        { ... },
        { ... }
      ]
    }
  ]
}

If you provide an Array, each option object within that array will be applied sequentially.

Available Options

OptionBehaviorDefault
includesAn Array<String> or String of glob patterns to include**/*.html
excludesAn Array<String> or String of glob patterns to exclude
queryThe selector quuery to find external linksa[href^="http://"], a[href^="https://"], a[href^="//"], a[href][ref*="external"]
targetThe target attribute to set on the anchor_blank