Introduction
So I was about to publish my next post about some simple but yet effective development I did on the dotnetblogengine which is the blog engine running this blog and how easy it is to add custom extensions. I was glad that with few lines of code and a less than 5 minute youtube tutorial, I was able to make a Google Authorship extension for my blog, see plan below :).
The plan scribbles on a piece of wine stained paper as opposed to notes I take at work, these are normally coffee stained reported something like this. GoogleAuthorshipExtension for dotnetblogengine.
- On end of each post publishing
- Gets the post author
- Reads from an uploaded XML file
- XML file contents
- Blog Post Author
- GoogleAuthorid
- Display Google Authorship
- Author Description
Practically, my first BlogEngine.NET.Custom.Extensions
would append the author details based on the Google authorship standard to every post in my blog.
What is Google Authorship and Why Was It Relevant for SEO
Google Authorship is a way to link blog content like posts to the actual author Google+ profile. This is easily achieved using the < a rel="author"
and passing in your Google plus profile id. This not only claimed to improve the search results but also returned a nice picture of the author, nice is a relative word in some cases. PS: At this point, I realized I was building an obsolete tool.
Why was relevant ..... easy cause Google understood that there is even a better way to do things and they kindly informed the community that:
I Repeat Authorship is Dead
Google ended its three-year experiment with Google Authorship yesterday, but the use of Author Rank to improve search results will continue, from the google webmasters blog.
The Dotnetblogengine Extension for Google Authorship in 20 Minutes
If you have the code base of blogengine and it is open in Visual Studio and no problem with publishing, this will be an interesting 10 minute job. If you do not, then cool, great time to get started with this new blog engine, go get the code from CodePlex.
You will need to add a new class to the extension folder: Custom\Extensions\OnPageSeo.cs. By referencing a couple of Blogengine libraries, BlogEngine.Core
and BlogEngine.Core.Web.Controls
;
[Extension("OnPage Description Metatags, Google Author","1.0.0","Adrian Cini")]<br />
public class OnPageSeo
The web controls reference will allow us to define extension attributes. Thanks to this, we will be able to plug an event on the post - a right place to do this is in the constructor.
public OnPageSeo()
{
Post.Serving += new EventHandler<servingeventargs>(Post_Serving);
}
and add our HTML to the end of the body post with just a simple string
concat.
public void Post_Serving(object sender, ServingEventArgs e){
if (e.Location == ServingLocation.SinglePost)
{
e.Body += GetAuthorTag("111254170622220751214");
e.Body += FaceBookShare();
}
Conclusion
If Google can afford to kill the work done on their authorship program, then so can I. That is the way the cookie crumbles and now that I know how easy it is to add extensions to the blogengine platform, just sit back and wait for The Rich Snippit Extension created by myself in my next article.
See what Google had to say back in the day: