Click To Tweet Tutorial Update
My click to tweet tutorial has been doing pretty well in terms of appearing early in search results. When my Git tutorial started to do the same, I tweaked it to give it an SEO push and have seen some positive ressults.
Therefore, I'm doing the same thing with the click to tweet tutorial.
The Changes
A complete, general list of the changes…
- refactor the code to use the window.location property: if the links that get Tweeted contain things like query strings and hash tags, those things were previously removed with a regular expression. This doesn't work on a global level so I'm now cleaning up the link with
window.location
property. It gets the job done in all situations and I walk through various ways to use it. - lots of copy adjustments: there a little less copy than before and the content itself looks different. Also, I updated the title and meta description and get to the point quicker in this update.
- shorten the code: the previous code was 16 lines long and worked, but I reduced it to 12. That's not a HUGE reduction; however, the code runs faster than it did before.
- scrape the open graph content: I updated the meta open graph stuff so I had to scrape it with Facebook's Sharing Debugger so those updates would actually appear.
Using the SEO Plugin
The BIG reason I'm doing all this was that my WordPress-based site uses Yoast's WordPress SEO plugin. The plugin has always been great, but it's REALLY improved over the last few months.
Along with its great SEO analyzing engine, it also includes a Readability analyzing engine. The latter gives tips on how readable a post is…I followed its advice and made a few adjustments to the text…and all is good.
Read the click to tweet tutorial