Open andreav opened 1 year ago
In the end I adopted this solution, I hope it will be useful to the reader:
gatsby-plugin-sitemap
configuration (nothing at all, just listing the plugin inside gatsby-config.js
)hreflang
linksEvery page has links like in the following example (this example is referring to the / root page).
Note: I'm using generateDefaultLanguagePage: false, my default language is en
so for this language I'm doing a little differently.
<link rel="alternate" hreflang="x-default" href="https://www.MYURL/">
<link rel="alternate" hreflang="af" href="https://www.MYURL/af/">
...
<link rel="alternate" hreflang="en" href="https://MYURL/">
...
<link rel="alternate" hreflang="vi" href="https://MYURL/vi/">
Hello, sorry but I'm a bit confused about how to generate the sitemap.xml
I tried the code in the README.md but it is not working. Then I found different threads about this topic, I tried them with no luck. Which is the recommended method as of today?
Thank you.
My package.json is: