Giter Site home page Giter Site logo

yoast / yoastseo.js Goto Github PK

View Code? Open in Web Editor NEW
402.0 40.0 173.0 20.54 MB

Analyze content on a page and give SEO feedback as well as render a snippet preview.

License: GNU General Public License v3.0

JavaScript 93.06% TypeScript 0.01% HTML 6.38% SCSS 0.43% EJS 0.12%

yoastseo.js's Introduction

Deprecated repository

This repository will go read-only soon. Relevant issues will be, or have been, moved to their reelevant repositories. Please use the wordpress-seo repository for feature requests or bugreports regarding the content analysis in the Yoast SEO plugin.

If you find an issue in this repository that is still relevant but was not moved, please use the above links to submit a new bugreport in the correct repository. Please include a link to the issue from this repository in your new report.

yoastseo.js's People

Contributors

terw-dan avatar atimmer avatar manuelaugustin avatar nataliashitova avatar hansjovis avatar irenestr avatar igorschoester avatar omarreiss avatar afercia avatar moorscode avatar jcomack avatar agnieszkaszuba avatar boblinthorst avatar renovate-bot avatar bramheijmink avatar xyfi avatar rensw90 avatar kingdutch avatar abotteram avatar greenkeeperio-bot avatar nostrabramus avatar dieterrr avatar diedexx avatar tacoverdo avatar alxy avatar laurent-1971 avatar renovate[bot] avatar djennez avatar xhsien avatar

Stargazers

 avatar  avatar Anne Thorpe avatar  avatar Uranus Lei avatar Yigit Kocak avatar Hayden Duffy avatar  avatar Susanto Effendi avatar  avatar Erich Schmidt avatar Reed Johnson avatar Draybaba avatar Aomd avatar Fahrul putra pratama avatar Dheia avatar Sachin avatar Vinicius G. Martin avatar BatsMan_Wild avatar  avatar  avatar  avatar  avatar  avatar Zhivar Sourati avatar Judah avatar Koorosh avatar Horváth Tamás avatar Cameron avatar Owen Saunders avatar Theofanis Despoudis avatar  avatar Akarapong Pudjai avatar  avatar Hyan Mandian avatar Khairul Azam avatar Sen Vàng Adv avatar Temi Lajumoke avatar saidalafghaniedsa avatar  avatar Mahmoud Ferig avatar ABDUL HASIB UDDIN avatar Vecsei Szilveszter avatar DocLock17 avatar Klaus avatar Cem Özgen avatar Monir Tarabishi avatar Lydia Alili avatar Samir T. Mammadov avatar Andy Lin avatar Florian Schlachter avatar Mark Zhou avatar Kota Minegishi avatar Sathya Sudarshan avatar Muhammed İKİNCİ avatar Isman avatar Abhit Maurya avatar Meharab G avatar Thành Hoàng (Thomas) avatar Jonathan Bernardi avatar LAOUAJ-NOZIERES avatar  avatar Javad Pourmostafa avatar Adhi avatar  avatar  avatar Rui Hu avatar Aditya Saurabh avatar Jagadeesh avatar Oruç Berat Turan avatar Khaled Mahmud avatar Yogi Prasetyawan avatar Avinash Toppo avatar Fahmida Tasnim Lisa avatar Alexander Leonardo Lique Lamas avatar YRHu avatar Anil avatar Md. Sumon Islam avatar Tianqi Yang avatar Felix Frohboese avatar Edson Frainlar avatar Moiz Qureshi avatar Wenyu Yang avatar  avatar Julia Jakubczak avatar tncy avatar Munira avatar Siamak avatar Seungwon(Tess) Chung avatar  avatar Araks Stepanyan avatar sunny.days avatar Brenton Morris avatar DrDirk avatar  avatar Brandon Stiles avatar Linda Oglesbee avatar zhangxian avatar Jesse Jones avatar Mohammadreza moghimi avatar

Watchers

Sergey Biryukov avatar Chen Osipov avatar Ahmed Abu Eldahab avatar Mykola Shlyakhtun avatar Joost de Valk avatar  avatar James Cloos avatar Micah Wood avatar  avatar António Santos avatar  avatar Javi A. avatar Rajab Natshah avatar  avatar Shounak Gupte avatar  avatar Thijs de Valk avatar bretmavrich avatar JUNO_OKYO avatar  avatar  avatar Yoram van de Velde avatar  avatar Caroline Geven avatar  avatar Luc avatar Ramon Bauza avatar  avatar  avatar Doc Wattsman avatar Johanna de Vos avatar  avatar  avatar Michael Brian Tiña avatar  avatar  avatar Abhit Maurya avatar All Breed Tees avatar Ramkumar avatar  avatar

yoastseo.js's Issues

UX improvements for Snippet preview

  • Make sure only the slug part of the URL is editable and it updates the slug too
  • Show complete text when editing. Only truncate when the input field is not selected.
  • Show red text when input is too long.
  • Add edit icon behind the snippet preview fields on hover.

Create spechelper

We've added some logic to the analyzer to make testing in isolation possible. This should be handled in the tests itself. Use Spec utilities to dry stuff.

Localize text analysis

We've received reports that not all current checks may apply to every language/locale.

We received the following example for Hebrew;

almost all prepositions such as "to", "for" etc are attached to the noun itself in Hebrew. This makes them unrecognizable to Yoast SEO, and so it states that the keyword "isn't" there and makes recommendations based on it.

I'm sure there are more differences like this rendering certain checks unnecessary for specific locales or, the contrary, adding the need for specific checks for a specific locale.

This is not an issue that can be fixed easily, as it does require knowledge of (how Google handles) each locale, but it might be a good place for the discussion on if/how we want to do this.

Add glotpress download task

We want to download the translations from glotpress before converting them to json, so add the glotpress download task to do this.

Prerelease Checklist

  • Display issues in Firefox #51
  • Snippet preview UX improvements #53
  • Use a list instead of a table #49
  • No newlines in snippet preview #48
  • Don't submit the form when hitting enter #47
  • Inaccessible bullets (add screenreader-text) #46
  • Labels have no for attribute #45
  • Error: linking to another page with the focus keyword #44
  • Add diacritics #42

Stop words test is broken

Used the copy from my real-time content analysis post as input, and content analysis as the focus keyword.

Got the following "warning":

The focus keyword for this page contains one or more stop words, consider removing them. Found 'is'.

Descriptive keyword analysis

Currently, our keyword analysis is mainly directive.

I think it could also be really helpful to have more descriptive keyword analysis.

Maybe some piece of content I've written is actually very good or useful as is. It might be quite optimized for different keywords than the one I've thought of.

As a writer, I would then like to gain insight into what my currently written text is good for.

Based on the content I've written, I can imagine it would be interesting to know:

  • Top keywords
  • Keyword groups (which keywords often appear in the same sentence)
  • Top keywords based only on headers, links and first sentences of paragraphs. That might add some indication about the quality of the main message contained inside the text.

We could also tag a post with its top keywords or we could save it as a postmeta. The data could be used for keyword suggestion or could be sent to GA as a custom dimension.

Add N/A option to scoring

currently a score of 0 implies a N/A SEO score. Since the score could become 0 with a valid SEOscore, a N/A option has to be added.

Error: linking to another page with the focus keyword

My focus keyword is 'Yoast' and I'm linking to 'yoast.com'. I'm linking to this page with another word than my focus keyword. Yet I get the following notice:
You're linking to another page with the focus keyword you want this page to rank for, consider changing that if you truly want this page to rank.

Text:
<a href='http://example.com/yoast'>Test</a>

It seems there's a check for the href and title as well as the text we're linking with. In the current analysis there only is a check for the text we're linking with. In the example above, this is with 'Test'.

Improve initialisation flow

I really want to initialise the analyser like this:

var analyzerApp = new YoastSEO.App({
    contentFunction: contentCallback,
    titleFunction: titleCallback,
    queue: [ "step1", "step2" ]
});
analyzerApp.analyze();

We should define what the bare minimum is that the analyser requires and document this in the README. There should be no object required to pass in the App.

We should document all possible parameters and parameter types in the README.

Cleanup strings in scoring.js

There are strings that don't have a first replacement, %1$s. There is also a string that is missing <code> tags around a non-translatable.

Incorrect submit/refresh

When pressing 'Enter' after typing the focus keyword, the page refreshes and loses all of its content.

Browser used: Chrome (OS X)

SERP snippet showing raw HTML

Noticed this when scoping out the new yoast Drupal module. The SERP snippet simulation is showing raw HTML in the excerpt area. Of course Google never shows HTML tags there so neither should the yoast snippet.

<div id="yoast-snippet"><div id="snippet_preview"><div class="snippet_container" id="title_container"><span contenteditable="true" class="title" id="snippet_title">Well | GLAZED</span></div><div class="snippet_container" id="url_container"><cite class="url urlBase" id="snippet_citeBase">http://localhost/</cite><cite contenteditable="true" class="url" id="snippet_cite"><strong></strong>e<strong></strong>l<strong></strong>e<strong></strong>m<strong></strong>e<strong></strong>n<strong></strong>t<strong></strong>s<strong></strong>/<strong></strong>w<strong></strong>e<strong></strong>l<strong></strong>l<strong></strong></cite></div><div class="snippet_container" id="meta_container"><span contenteditable="true" class="desc" id="snippet_meta">&lt;div id="b16" class="az-element az-section" style="padding-top: 60px; position: relative;" data-az-id="b16" data-</span></div></div></div>

Bullets not accessible - empty divs

developer_tools_-_https___yoast_com_research_real-time-content-analysis___and_yoast_seo_content_analysis

The bullets are empty divs, thus a screenreader will skip them. Adding a span describing the bullet to the div using the screen-reader-text CSS class could solve this problem.
More information on the screen-reader-text CSS class on blog.rrwd.nl.

Example
Current: <div class="wpseo-score-icon bad"></div>
Suggestion: <div class="wpseo-score-icon bad"><span class="screen-reader-text">Bad</span></div>

Note
The screen-reader-text class will have to be added to the CSS to make this work.

It can't find words with special characters in the content.

I encounter this error on this post: http://www.scroll.com.tr/8-gb-ramli-kapakli-telefon-geliyor-mu/

The focus keyword is "kapaklı". As you can see it contains a special character (dotless i, Turkish character). Because of dotless i, analyze page shows that there is no focus keyword in the first paragraph but you can see it in the first paragraph.

Here is two screenshots from admin panel. First one is the General tab. It says there is 3 occurences of focus keyword in the content and it's right.

general_tab

But on Page Analysis tab it says that "The keyword doesn't appear in the first paragraph of the copy, make sure the topic is clear immediately."

page_analysis_tab

If I change the focus keyword from "kapaklı" to "telefon", I get a green score, but without change it's orange.

I hope it's clear enough.

Some data:
WordPress version: 4.3.1 (single site)
Yoast SEO Premium version: 2.3.5
Server operationg system: CentOS
Web servers: Apache, nginx (proxy)
PHP version: 5.3.3

Custom fields implementation

Functionality:

As a user of the blog posts section in WordPress, I want to use custom fields in the page analysis tool. The page analysis tool should use the fields in the scanning process to determine the content value.

UI:

The page analysis should be analysed when the user is done with typing in one of the input fields. After that, we should trigger the custom field analysis and "on finish" update the results in the page analysis scoring page.

Integration & Data management:

To resolve this issue, we have a few scenario’s which could be used. After our discussion, we think Scenario 6 is our best case.

Scenario 1:

Load all short codes on page load.

Pros:
  • Everything is on the page available when we need it.
Cons:
  • The page load time is very slow.

Scenario 2:

Pre-load on page in user memory.

Pros:
  • Faster page load then Scenario 1.
  • Bottlenecks are traceable
  • Everything is loaded when we need it on the page.
Cons:
  • Possible client side memory issue.

Scenario 3:

Dynamic fetch (async).

Pros:
  • We don't have to preload everything
  • There isn't much stored on the client side
Cons:
  • Unpredictable
  • Timing issues

Scenario 4:

Scenario 2 + reload functionality

Pros:
  • We have more up-to-date data
Cons:
  • Same as Scenario 2

Scenario 5:

Build our own short code integration.

Pros:
  • Other plugin developers don't have to change a lot in their plugins.
Cons:
  • We need to centralize all short codes

Scenario 6:

Local storage for all (rendered) short codes. This scenario includes a hash verifier to detect updates.

Pros:
  • Very fast storing mechanism for clients
Cons:
  • We need to hash the local storage and verify it with our hash to detect updates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.