Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Text analysis and assessment library in JavaScript. This library can generate interesting metrics about a text and assess these metrics to give you an assessment which can be used to improve the text.
Also included is a preview of the Google search results which can be assessed using the library.
You can install YoastSEO.js using npm:
npm install yoastseo
If you want the complete experience with UI and everything you can use the App
. You need to have a few HTML elements to make this work: A snippet preview container, a focusKeyword input element and a content input field.
var SnippetPreview = require( "yoastseo" ).SnippetPreview;
var App = require( "yoastseo" ).App;
window.onload = function() {
var focusKeywordField = document.getElementById( "focusKeyword" );
var contentField = document.getElementById( "content" );
var snippetPreview = new SnippetPreview({
targetElement: document.getElementById( "snippet" )
});
var app = new App({
snippetPreview: snippetPreview,
targets: {
output: "output"
},
callbacks: {
getData: function() {
return {
keyword: focusKeywordField.value,
text: contentField.value
};
}
}
});
app.refresh();
focusKeywordField.addEventListener( 'change', app.refresh.bind( app ) );
contentField.addEventListener( 'change', app.refresh.bind( app ) );
};
You can also invoke internal components directly to be able to work with the raw data. To get metrics about the text you can use the Researcher
:
var Researcher = require( "yoastseo" ).Researcher;
var Paper = require( "yoastseo" ).Paper;
var researcher = new Researcher( new Paper( "Text that has been written" ) );
console.log( researcher.getResearch( "wordCountInText" ) );
English | German | Dutch | French | Spanish | Italian | Japanese | Portuguese | Russian | |
---|---|---|---|---|---|---|---|---|---|
Transition words | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
Flesch reading ease | ✅ | ✅ | ✅ | ✅ | ❌2 | ||||
Passive voice | ✅ | ✅ | ✅ | ✅ | ❌2 | ✅ | |||
Sentence beginnings | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌2 | ✅ | |
Sentence length1 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ||
Function words (for Internal linking and insights) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
1 This means the default upper limit of 20 words has been verified for this language, or the upper limit has been changed.
2 This means that this feature doesn't make sense for the specific language.
The following readability assessments are available for all languages:
Please see CHANGELOG for more information what has changed recently.
The data that will be analyzed by YoastSEO.js can be modified by plugins. Plugins can also add new research and assessments. To find out how to do this, checkout out the customization documentation.
npm test
Generate coverage using the --coverage
flag.
To test your code style:
grunt check
In the YoastSEO.js directory, run:
npm link
Then, in the Yoast SEO directory, assuming you have a complete development version, run:
npm link yoastseo
grunt build:js && grunt build:css
From that point on you need to re-do grunt build:js && grunt build:css
when you make changes to YoastSEO.js. If you want to unlink, simply do:
npm unlink yoastseo
Please see CONTRIBUTING for details.
If you discover any security related issues, please email security [at] yoast.com instead of using the issue tracker.
We follow the GPL. Please see License file for more information.
FAQs
Yoast client-side content analysis
We found that yoastseo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.