Sitemap?
Hey there!
Is it possible to generate a sitemap for a Nextra based project?
Thanks! :-)
@Suniron I was able to do so with adding the next-sitemap package and following the instructions in their docs. It was pretty simple and it generates a proper sitemap.
Yes, sorry for this issue. In fact, it was really easy..
Still an enhancement that Nextra can probably have. Maybe we can look into including next-sitemap by default :)
Using nextra with next-sitemap and i18n generates sitemap for default language only. But it perfectly generates all language versions on build as expected. It seems that next-sitemap ignores all other language subfolders (in my case /es/) generated by nextra except the default locale.
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.js',
unstable_staticImage: true
})
module.exports = withNextra({
i18n: {
locales: ['en', 'es'],
defaultLocale: 'en',
// localeDetection: false,
}
})
I don't see the future for this issue, next-sitemap should be executed after next build command and the physical next-sitemap config should be present.
The only way is by adding/configuring manually next-sitemap in your project.