Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sitemaps] support for alternate links #149

Closed
sebastian-nagel opened this issue Feb 7, 2017 · 0 comments
Closed

[Sitemaps] support for alternate links #149

sebastian-nagel opened this issue Feb 7, 2017 · 0 comments

Comments

@sebastian-nagel
Copy link
Contributor

Some extensions of the sitemap protocol allow alternate links, e.g.

<?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"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
  <url>
    <loc>http://www.i-run.be/electronique/</loc>
    <xhtml:link rel="alternate" hreflang="fr-FR" href="http://www.i-run.fr/electronique/"/>
    <xhtml:link rel="alternate" hreflang="fr-BE" href="http://www.i-run.be/electronique/"/>
    <xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.i-run.be/electronique/"/>
  </url>
 ...
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
   <url>
      <loc>https://bnc.lt/GC8j/s/d2ceaafba1faa604ed6046de6ec5c2dae2d6531bc0a91685aa80bace9218d369</loc>
      <lastmod>2016-06-13</lastmod>
      <xhtml:link
                rel="alternate"
                href="android-app://com.ebay.vivanuncios.mx/vivanunciosmx/search?locationid=1013&keyword=traspaso papeleria&link_click_id=s-d2ceaafba1faa604ed6046de6ec5c2dae2d6531bc0a91685aa80bace9218d369"
                />
      <xhtml:link
                rel="alternate"
                href="ios-app://872789604/vivanunciosmx/search?locationid=1013&keyword=traspaso papeleria&link_click_id=s-d2ceaafba1faa604ed6046de6ec5c2dae2d6531bc0a91685aa80bace9218d369"
                />
      </url>
      ...

Note: alternate links (if syntactically correct) do not break the sitemap parser, they are simply ignored same as additions by other extensions (image, video, news sitemaps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants