Google Authorship Markup and Business Catalyst Blog Module

Introduction: Since Google Authorship is not supported in web search. And we also use rich snippets now. But this article can be example, how to use web-app data easily in liquid template, for example in blog.

Google Authorship Markup was an useful SEO instrument not so long ago. General idea was to use the link to author's Google+ account. It was very fashionable to get Google snippet.

It was cool to include such markup into blog articles and even get more traffic. At the moment much more interesting to set good structured pages regarding http://schema.org/

It does not work now, pity. But normal ethic manner will be to display the first authority. It also could be link to Google+ or Linkedin Account

In this article we'll show you how to add such link to the blog-posts on your Business Catalyst site.

Let's go to the module templates:

BC module templates

Select Blog Layouts:

BC blog layouts

And look on the top part of Blog Post Detail Layout template:

BC blog post details layout

Let us make this code more interesting for search engines. We see here some person information and date also. So we can improve this code using tags and Person markup. So change code with following:

<div class="blog-post" itemscope itemType="http://schema.org/BlogPosting">
    <h2 class="post-title" itemprop="headline" style="text-align:left"> {tag_blogposttitle_nolink} </h2>
  <div class="introduction" itemprop="description">{tag_blogpostmetadescription}</div>
  <div class="post-details"> 
    <span itemprop="author">{tag_blogpostauthor}</span> - 
      <meta itemprop="datePublished" content="{tag_blogpostyear}-{tag_blogpostmonthnumeric}-{tag_blogpostday}">{tag_blogpostdate}</div>

Ok. First part is done. The tag {tag_blogpostauthor} just render a post author name like plain text. But we need something more complex. How to place author's link if we have not such tag?

We need a webapp for that. In our site we already have a custom webapp with a name Team which we use for rendering our team page. In such case we can just a new fields for Google+ and Linkedin links. If you don't have such webapp you can create it very easy by menu Web Apps - Add Web App. In my case as I said I have something like that:

BC edit web app

Click Edit Web App Settings and go to the Field tab. Here you can click Add Field button and add new field:

BC web app team edit

Now we can fill that field by the link to the Google+ profile:

BC Google+ link

OK. Now we need to add some Liquid code. Return to the blog post template and include the next piece of code:

{module_webapps render="collection" id="Team" collection="team" filter="all" template=""}
{% for person in team.items -%}
{% if person.name == author -%}
<a target="_blank" style="color: #777777;" rel="publisher" 
    href="{{person.['googleplus link']}}?rel=author">{{author}}</a>
{% endif -%}
{% endfor %}

Here we use module_webapps for access to webapp data and than use loop for find a relative data. The result will be looked like that:

BC google autorship markup

That's all. We can check the result:

BC google authorship markup example

As you can see adding the Authorship markup is relatively easy for blog posts.