#1 2014-12-02 12:46:04

MartinK
Member
From: Tallinn
Registered: 2012-03-04
Posts: 42
Website

[ADDED] Multilingual sitemap

The current sitemap does not follow the best practices for multilingual sites. The sitemap algorithm creates <url> entities for every separate url in all the available languages. My suggestion would be a rewrite of the algorithm so that it would use alternative content links and "hreflang" attributes and create similar looking sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>http://www.example.com/en/</loc>
    <xhtml:link 
                 rel="alternate"
                 hreflang="de"
                 href="http://www.example.com/de/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en"
                 href="http://www.example.com/en/"
                 />
  </url>
  
  <url>
    <loc>http://www.example.com/de/</loc>
    <xhtml:link 
                 rel="alternate"
                 hreflang="en"
                 href="http://www.example.com/en/"
                 />
     <xhtml:link 
                 rel="alternate"
                 hreflang="de"
                 href="http://www.example.com/de/"
                 />
  </url>  
</urlset>

More information can be found here: https://support.google.com/webmasters/a … 0865?hl=en


Ionize will rule the Internet one day!

Offline

#2 2014-12-11 09:57:36

MartinK
Member
From: Tallinn
Registered: 2012-03-04
Posts: 42
Website

Re: [ADDED] Multilingual sitemap

This commit implements the multilingual sitemap functionality (I've tested it and it works perfectly): https://github.com/ionize/ionize/pull/198/commits

Last edited by MartinK (2014-12-11 09:58:06)


Ionize will rule the Internet one day!

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations