It would be nice if Blocs was able to export a sitemap for multilingual sites.
If anyone knows how to do it properly, I’d love to have some tips
It would be nice if Blocs was able to export a sitemap for multilingual sites.
If anyone knows how to do it properly, I’d love to have some tips
For what I understand, I have to add a code in each Header of my French pages
<link rel="alternate" hreflang=“en” href="https://www.exemple.com/en/index.html" />
<link rel="alternate" hreflang=“en-fr” href="https://www.exemple.com/en/index.html" />
<link rel="alternate" hreflang="x-default" href="https://www.exemple.com" />
And in each Header of my English pages
<link rel="alternate" hreflang=“fr” href="https://www.exemple.com/index.html" />
<link rel="alternate" hreflang=“en-fr” href="https://www.exemple.com/index.html" />
<link rel="alternate" hreflang="x-default" href="https://www.exemple.com" />
And here is what my sitemap will look like…
Am I doing anything wrong ?
<?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>https://www.exemple.com/</loc>
<xhtml:link
rel="alternate"
hreflang=“fr”
href="https://www.exemple.com/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en”
href="https://www.exemple.com/en/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en-fr”
href="https://www.exemple.com/en/index.html"/>
<lastmod>2020-05-28</lastmod>
<changefreq>Weekly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://www.exemple.com/en/index.html</loc>
<xhtml:link
rel="alternate"
hreflang=“fr”
href="https://www.exemple.com/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en”
href="https://www.exemple.com/en/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en-fr”
href="https://www.exemple.com/en/index.html"/>
<lastmod>2020-05-28</lastmod>
<changefreq>Weekly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://www.exemple.com/portoflio/index.html</loc>
<xhtml:link
rel="alternate"
hreflang=“fr”
href="https://www.exemple.com/portoflio/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en”
href="https://www.exemple.com/en/portoflio/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en-fr”
href="https://www.exemple.com/en/portoflio/index.html"/>
<lastmod>2020-05-28</lastmod>
<changefreq>Weekly</changefreq>
<priority>.5</priority>
</url>
<url>
<loc>https://www.exemple.com/en/portoflio/index.html</loc>
<xhtml:link
rel="alternate"
hreflang=“fr”
href="https://www.exemple.com/portoflio/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en”
href="https://www.exemple.com/en/portoflio/index.html"/>
<xhtml:link
rel="alternate"
hreflang=“en-fr”
href="https://www.exemple.com/en/portoflio/index.html"/>
<lastmod>2020-05-28</lastmod>
<changefreq>Weekly</changefreq>
<priority>.5</priority>
</url>
</urlset>
Thing is blocs-app ask for what language is the website
why it doesn’t automatically apply lang attribute to the website or the page?