I’m trying to build a blog with a specific URL path in mind, specified as follows
...
i18n: {
// These are all the locales you want to support in
// your application
locales: ['en', 'de'],
// This is the default locale you want to be used when visiting
// a non-locale prefixed path e.g. `/hello`
defaultLocale: 'en',
// localePath: path.resolve('./public/locales')
},
async rewrites() {
return [
{
// Assuming 'default.js' should handle the base of each slug
source: '/:locale/:cat/:slug*',
destination: '/post/slug/',
}
];
},
...
My folder structure is:
post -> slug -> default.js
I’m trying to map the URL:
localhost.com/locale/category/slug
for example
localhost.com/en/beaches/best-beaches
But it doesn’t fig the path it always gives me a 404, any suggestion how to achieve this ?