axyseo 2.1.7 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,9 +24,9 @@ export default class PageTitleWidthAssessment extends Assessment {
|
|
|
24
24
|
priority: 'high',
|
|
25
25
|
title: 'Meta title width',
|
|
26
26
|
content: {
|
|
27
|
-
good: 'Title width is optimized, between
|
|
27
|
+
good: 'Title width is optimized, between 10 - 70 characters.',
|
|
28
28
|
improve: '',
|
|
29
|
-
bad: 'Title too long or too short. Aim for
|
|
29
|
+
bad: 'Title too long or too short. Aim for 10-70 characters for best display in search results.'
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
this.identifier = TITLE_WIDTH_ID;
|
|
@@ -61,7 +61,7 @@ export default class PageTitleWidthAssessment extends Assessment {
|
|
|
61
61
|
calculateResult(paper) {
|
|
62
62
|
const length = paper.getTitle().length;
|
|
63
63
|
let status = '';
|
|
64
|
-
if (length <= 70 && length >=
|
|
64
|
+
if (length <= 70 && length >= 10) {
|
|
65
65
|
status = 'good';
|
|
66
66
|
} else {
|
|
67
67
|
status = 'bad';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTitleWidthAssessment.js","names":["merge","Assessment","AssessmentResult","TITLE_WIDTH_ID","PageTitleWidthAssessment","constructor","config","defaultConfig","id","fixPosition","docUrl","ctaType","priority","title","content","good","improve","bad","identifier","_config","getResult","paper","researcher","assessmentResult","calculatedResult","calculateResult","setScore","score","setStatus","status","length","getTitle","getScore","isApplicable","hasTitle"],"sources":["../../../../src/scoring/assessments/seo/PageTitleWidthAssessment.js"],"sourcesContent":["import {merge} from 'lodash';\nimport Assessment from '../assessment';\nimport AssessmentResult from '../../../values/AssessmentResult';\nimport {TITLE_WIDTH_ID} from '@axyseo/const/analysis';\n\n/**\n * Represents the assessment that assesses the SEO title width and gives the feedback accordingly.\n */\nexport default class PageTitleWidthAssessment extends Assessment {\n /**\n * Sets the identifier and the config.\n *\n * @param {Object} [config] The configuration to use.\n *\n * @returns {void}\n */\n constructor(config = {}) {\n super();\n\n const defaultConfig = {\n id: TITLE_WIDTH_ID,\n fixPosition: 'meta title',\n docUrl:\n 'https://docs.avada.io/seo-suite-help-center/seo-audit/on-page-seo/checklist#title-width',\n ctaType: 'fix',\n priority: 'high',\n title: 'Meta title width',\n content: {\n good: 'Title width is optimized, between
|
|
1
|
+
{"version":3,"file":"PageTitleWidthAssessment.js","names":["merge","Assessment","AssessmentResult","TITLE_WIDTH_ID","PageTitleWidthAssessment","constructor","config","defaultConfig","id","fixPosition","docUrl","ctaType","priority","title","content","good","improve","bad","identifier","_config","getResult","paper","researcher","assessmentResult","calculatedResult","calculateResult","setScore","score","setStatus","status","length","getTitle","getScore","isApplicable","hasTitle"],"sources":["../../../../src/scoring/assessments/seo/PageTitleWidthAssessment.js"],"sourcesContent":["import {merge} from 'lodash';\nimport Assessment from '../assessment';\nimport AssessmentResult from '../../../values/AssessmentResult';\nimport {TITLE_WIDTH_ID} from '@axyseo/const/analysis';\n\n/**\n * Represents the assessment that assesses the SEO title width and gives the feedback accordingly.\n */\nexport default class PageTitleWidthAssessment extends Assessment {\n /**\n * Sets the identifier and the config.\n *\n * @param {Object} [config] The configuration to use.\n *\n * @returns {void}\n */\n constructor(config = {}) {\n super();\n\n const defaultConfig = {\n id: TITLE_WIDTH_ID,\n fixPosition: 'meta title',\n docUrl:\n 'https://docs.avada.io/seo-suite-help-center/seo-audit/on-page-seo/checklist#title-width',\n ctaType: 'fix',\n priority: 'high',\n title: 'Meta title width',\n content: {\n good: 'Title width is optimized, between 10 - 70 characters.',\n improve: '',\n bad:\n 'Title too long or too short. Aim for 10-70 characters for best display in search results.'\n }\n };\n\n this.identifier = TITLE_WIDTH_ID;\n this._config = merge(defaultConfig, config);\n }\n\n /**\n * Runs the h1 research and based on this returns an assessment result with a score.\n *\n * @param {Paper} paper The paper to use for the assessment.\n * @param {Researcher} researcher The researcher used for calling the research.\n * @returns {AssessmentResult} The assessment result.\n */\n getResult({paper, researcher}) {\n const assessmentResult = new AssessmentResult({config: this._config});\n\n const calculatedResult = this.calculateResult(paper);\n\n assessmentResult.setScore(calculatedResult.score);\n assessmentResult.setStatus(calculatedResult.status);\n\n return assessmentResult;\n }\n\n /**\n *\n * @param paper\n * @returns {{score: number, status: string}}\n */\n calculateResult(paper) {\n const length = paper.getTitle().length;\n\n let status = '';\n if (length <= 70 && length >= 10) {\n status = 'good';\n } else {\n status = 'bad';\n }\n const score = this.getScore(this._config.priority, status);\n\n return {\n score,\n status\n };\n }\n\n /**\n * Checks whether the paper has a text.\n *\n * @param {Paper} paper The paper to use for the assessment.\n *\n * @returns {boolean} True when there is text.\n */\n isApplicable(paper) {\n return paper.hasTitle();\n }\n}\n"],"mappings":"AAAA,SAAQA,KAAK,QAAO,QAAQ;AAC5B,OAAOC,UAAU;AACjB,OAAOC,gBAAgB;AACvB,SAAQC,cAAc;;AAEtB;AACA;AACA;AACA,eAAe,MAAMC,wBAAwB,SAASH,UAAU,CAAC;EAC/D;AACF;AACA;AACA;AACA;AACA;AACA;EACEI,WAAWA,CAACC,MAAM,GAAG,CAAC,CAAC,EAAE;IACvB,KAAK,CAAC,CAAC;IAEP,MAAMC,aAAa,GAAG;MACpBC,EAAE,EAAEL,cAAc;MAClBM,WAAW,EAAE,YAAY;MACzBC,MAAM,EACJ,yFAAyF;MAC3FC,OAAO,EAAE,KAAK;MACdC,QAAQ,EAAE,MAAM;MAChBC,KAAK,EAAE,kBAAkB;MACzBC,OAAO,EAAE;QACPC,IAAI,EAAE,uDAAuD;QAC7DC,OAAO,EAAE,EAAE;QACXC,GAAG,EACD;MACJ;IACF,CAAC;IAED,IAAI,CAACC,UAAU,GAAGf,cAAc;IAChC,IAAI,CAACgB,OAAO,GAAGnB,KAAK,CAACO,aAAa,EAAED,MAAM,CAAC;EAC7C;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEc,SAASA,CAAC;IAACC,KAAK;IAAEC;E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