yoastseo-dep
Version:
Yoast clientside page analysis
70 lines (63 loc) • 2.46 kB
JavaScript
import { inherits } from "util";
import { Assessor, assessments, helpers } from "yoastseo-dep";
const { createAnchorOpeningTag } = helpers;
const {
IntroductionKeywordAssessment,
KeyphraseLengthAssessment,
KeyphraseDensityAssessment,
MetaDescriptionKeywordAssessment,
TextCompetingLinksAssessment,
ImageKeyphraseAssessment,
FunctionWordsInKeyphraseAssessment,
} = assessments.seo;
/**
* Creates the Assessor
*
* @param {Researcher} researcher The researcher used for the analysis.
* @param {Object?} options The options for this assessor.
* @param {Function} options.marker The marker to pass the list of marks to.
*
* @constructor
*/
const StorePostsAndPagesCornerstoneRelatedKeywordAssessor = function( researcher, options ) {
Assessor.call( this, researcher, options );
this.type = "storePostsAndPagesCornerstoneRelatedKeywordAssessor";
this._assessments = [
new IntroductionKeywordAssessment( {
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify8" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify9" ),
} ),
new KeyphraseLengthAssessment( {
isRelatedKeyphrase: true,
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify10" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify11" ),
} ),
new KeyphraseDensityAssessment( {
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify12" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify13" ),
} ),
new MetaDescriptionKeywordAssessment( {
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify14" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify15" ),
} ),
new TextCompetingLinksAssessment( {
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify18" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify19" ),
} ),
new FunctionWordsInKeyphraseAssessment( {
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify50" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify51" ),
} ),
new ImageKeyphraseAssessment( {
scores: {
withAltNonKeyword: 3,
withAlt: 3,
noAlt: 3,
},
urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify22" ),
urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify23" ),
} ),
];
};
inherits( StorePostsAndPagesCornerstoneRelatedKeywordAssessor, Assessor );
export default StorePostsAndPagesCornerstoneRelatedKeywordAssessor;