yoda-seo-tips
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Yoda SEO Tips

Get tips about SEO for your html code from Grand Master Yoda.

<title> tag this document should have
16 <strong> tags I count. More than 15 should be not.

Basic use:

import validate from "yoda-seo-tips"
validate('empty.html')

With settings:

validate('sample2.html', null, {maxStrongTags: 2})

Custom rules:

import {mustHaveElement, imgMustHaveAlt} from "yoda-seo-tips"
validate('sample1.html', null, [
    imgMustHaveAlt,
    mustHaveElement('article', () => '<article> is required'),
    ($, report) => {
        if($('title').text() == '') {
            report('Title should not be empty');
        }
    }
])

See src/rules.ts and src/yodaWisdom.ts for more samples on rule definitions.

Package Sidebar

Install

npm i yoda-seo-tips

Weekly Downloads

4

Version

1.0.0

License

ISC

Unpacked Size

106 kB

Total Files

36

Last publish

Collaborators

  • skijur