yoda-seo-tips
v1.0.0
Published
SEO tips from Yoda
Downloads
10
Readme
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.