website icon indicating copy to clipboard operation
website copied to clipboard

Adding Spell-Checking For the Website Blog

Open jayjayjpg opened this issue 7 years ago • 5 comments

Current Behavior

When editors for the Ember blog are publishing blog posts, there is no check process for spelling errors involved. This means that oftentimes spelling errors still get through to the website and they have to be fixed afterwards in separate PRs.

Expected Behavior

It would be great to have a spellchecking in place which prevents the build of the website to succeed if any spelling errors are detected. The setup should be restricted to the blog (/source/blog) for now. The spell checking setup should take into account any language errors of the English language, but should not throw any errors for custom words, code examples or proper nouns / names.

Possible Solution

A spell checking plugin that has been useful before for other Ruby apps of the learning team was middleman-spellcheck. It is encouraged to use the same plugin to add spellchecking to the website as well. See also this PR to find out how it was setup for the former Guides app.

You can check out the middleman-spellcheck documentation to find out how to allow custom words or entire sections for e.g. code examples, as well as how to allow e.g. @twitter-handles using regex rules for exclusion from spell checking.

For getting this change merged, it might also make sense to split up the work into two separate tasks:

    1. Setting up the spell checking on a very restricted part of the blog, e.g. only spell-checking the blog posts of the month September in 2018. This allows us to review and improve the spell-checking setup and get it merged
    1. Extending the spell checking scope to the entire set of blog posts. This PR would then include all the spelling fixes for the posts that had already been published and possibly a couple more tweaks to the spellchecking rules as needed

Since the blog already has a lot of content, it might make sense

Sources

Check out these issues and PRs for more context on this task:

  • Original issue: https://github.com/emberjs/website/issues/2488
  • Setup for middleman-spellcheck on the former guides app: https://github.com/emberjs/guides/pull/998
  • Middleman Spellcheck Docs: https://github.com/minivan/middleman-spellcheck#middleman-spellchecker
  • The Ember Blog: https://www.emberjs.com/blog/

jayjayjpg avatar Oct 02 '18 13:10 jayjayjpg

@jessica-jordan I would like to pick this up if anyone is not working on it

mercyg avatar Oct 02 '18 17:10 mercyg

@mercyg That sounds great! :sparkles:

jayjayjpg avatar Oct 02 '18 21:10 jayjayjpg

@jessica-jordan I am not familiar with ruby and I have a question. When I do "middleman spellcheck source/blog" I am getting " in block (2 levels) in spellcheck': undefined method sub' for nil:NilClass (NoMethodError)" this error. Any idea why this might be happening?

mercyg avatar Oct 05 '18 02:10 mercyg

@mercyg I wouldn't know right off the bat unfortunately, but If you like, we can pair on this step. Feel free to ping me here or on the Ember Discord server as @jessica anytime if you're up for it!

jayjayjpg avatar Oct 05 '18 12:10 jayjayjpg

@jessica-jordan ok I will thanks!

mercyg avatar Oct 05 '18 14:10 mercyg