In Flow: The Mura Blog

Google Sitemaps Revisited

December 12, 2017 by Grant Shepert

Of all the plugins in all the Mura instances, the Google Sitemaps plugin reigns supreme. I suppose this has to do less with the fact that it is the very first plugin ever written for Mura, and more to do with the fact that everybody, big or small, corporate or individual, needs the Google. The plugin has been around a long time, ever since Mura 5.2, and had changed little since then. Time, it seems, for a reboot.

Google Sitemaps Plugin 2.0

I wrote the original Google Sitemaps plugin in 2010 as a lone developer, a year before I joined Blue River's Core development team. Back then there was a lot of complication with getting content properly indexed; Flash-delivered text, ad-hoc JavaScript delivery, and other spider-unfriendly ways of rendering a website. Ironically that hasn't changed a whole lot, as today a great deal of content is delivered via React or Ember or Vue, a.k.a. non-linear, often url-disconnected JavaScript frameworks. Added to that automated A-B tests, personalized content and whole range of other 'tailoring' experiences that can muddle the Google's indexing spider. This means having a robust 'map' to your content is just as relevant as it was a decade ago.

There have been other evolutions since 2010. Multilingual content is becoming ever more important, and the entire click-driven 'content as news' industry drives a heck of a lot of today's traffic.

On the other side of the coin, the way things work has also changed dramatically. The Cloud is now ever-present, as are containers like Docker, installations that include cache servers, firewalls and distributed setups.

These are the primary challenges I wanted to address in the Google Sitemaps reboot. Let me walk you through how they have been addressed in the Mura Google Sitemaps plugin, v2.0.

Setup

To be fair, setup really hasn't changed much. In the first iteration, you installed the plugin and then used the Site Manager-added class extensions to include, exclude and weight your content. That is all the same, so rest assured an update won't break what you have or even require a rework of your configuration.

One thing that has changed is the ability to define *where* your sitemap will live. If you are using The Cloud (FYI it always rings ominous in my head when I type it, hence the capitals) or have any type of multi-server or multi-instance environment powering your website, you only want one sitemap to be generated from all. You can now define a specific directory beyond "site" or "root" folder, which should ease this small pain.

News

Google News has become a big thing, content-wise, and comes with its own set of rules as far as Google is concerned. For instance, submitted content must be no more than 48 hours old.

A few developers hacked this feature into the original version of the plugin, but now it is standard, and separately configurable. Simply identify the Mura Content Collection you want to use as the "source", and the plugin will do the rest. Mura Google Sitemaps 2.0 will generate a separate, news-friendly sitemap that pulls content to Google's specifications (i.e. only includes content from the collection that is less than 48 hours old) and formats the sitemap accordingly.

Translations

Multilingual content is an important aspect of the modern web, and in Mura we address that need through the Mura Translations plugin. Translations allows you to turn a Mura "site" into a translated instance of another Mura "site", and interconnect the pages within so that it is easy for a user to find a translated version of the content they are viewing.

Mura Google Sitemaps 2.0 will now look to see if you have Mura Translations installed, and if you do, it will include a new "Translations" tab. The setting(s) in this section will allow you to include references to all the translated versions for each page. For example, if your "About Us" page has been translated into French and Hindi, cross-referencing links to those pages will appear within all three sitemaps (assuming you have enabled the feature in all three sites).

This results in far better representation of your translated content within Google search results (which does all the heavy lifting as far as determining the reader's language of choice and presenting those links to them).

One Less Thing

The Google Sitemaps plugin is only a small component of the whole Mura ecosphere, but it is an important one. The updates in version 2.0 will make managing your website's relationship with Google a whole lot easier, giving you one less thing to worry about.