1.0.4 • Published 7 years ago

seo-rule-checker v1.0.4

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

seo-rule-checker

Scan a HTML file and show all of the SEO defects.

Installation

npm i seo-rule-checker

Usage

  1. Include RuleChecker and other rule checker module.

    RuleChecker, aTagRule, h1TagRule, headTagRule, imgTagRule, strongTagRule
  2. Create a new RuleChecker, then call addRule() method to add-on the seo rule. You can also chain others rule together and no order limit.

       Const ruleChecker = new RuleChecker();
       ruleChecker.addRule(new aTagRule())
                  .addRule(new h1TagRule())
                  .addRule( ... new Rule... )
  3. Before you invoke check() method, you need to determine the input source. And after check() you also need to invoke output destination.

       ruleChecker.addRule(rule1)
                  .addRule(rule2)
                  ...
                  .readFrom...()
                  .check()
                  .outputTo...();
  4. Support input:

    1. readFromFile('file_path')
    2. readFromStream(readable_stream)

  5. Support output:

    1. outputToFile('file_path')
    2. outputToConsole()
    3. outputToFileStream()

Easy to extend other rules

You can follow up the structure of other rule class and invoke another addRule(... your rule...) to RuleChecker.

Limit

Before using ,the HTML file need to be unminifiy.

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago