Code Monkey home page Code Monkey logo

Comments (5)

harlan-zw avatar harlan-zw commented on July 30, 2024 3

Hey, this is now available in 2.4.0, you can use the alternatives key.

I've also added automatic @nuxtjs/i18n support as well which may be useful.

Let me know if you have any issues :)

from sitemap.

harlan-zw avatar harlan-zw commented on July 30, 2024 1

Thanks for the issue @nico0756 and thanks for the detailed answer @tmlmt!

I intentionally didn't implement the xhtml namespace for the v2 release for two reasons:

  • Wasn't sure if anyone would actually need it, using the meta tags / HTTP headers is generally easier
  • I based the sitemap on the logic of Yoast SEO, which doesn't support this natively afaik

It seems like a valid feature so I'll look into supporting this soon.

from sitemap.

nico0756 avatar nico0756 commented on July 30, 2024 1

Thanks for the answers!

For now I'll stick to using the meta tags, but if in the future the xhtml namespace will be supported I'll try it for sure.

Thank you!

from sitemap.

tmlmt avatar tmlmt commented on July 30, 2024

Just bumped into this as I tried to implement it on my project and am discovering the details of sitemaps & localised versions.
You're not doing anything wrong, it's just that Harlan's simple sitemap generator is only handling urls of type SitemapFullEntry and doesn't handle the xhtml namespace

But if your goal is to indicate to search crawlers that there are localised versions of your pages, you can also do that by using HTML tags, as indicated in 1. And nuxt/i18n (if you're using it), handles it for you. It's my understanding, when reading in 1 where there is mention of three methods for doing so (HTML tags, HTTP headers and sitemap), that ...:

you can use all three methods at the same time

... that this should be sufficient to cover both the generation of a proper sitemap and indicating localised versions.
@harlan-zw could you confirm and give your thoughts on this issue?

Footnotes

  1. https://developers.google.com/search/docs/specialty/international/localized-versions 2

from sitemap.

heisig avatar heisig commented on July 30, 2024

Thank you for putting this on the agenda. I would also like to see the xhtml namespace to be supported. It would be very useful to construct a sitemap with localized versions.

from sitemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.