File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { NextResponse } from 'next/server';
22
33import provideWebsiteFeeds from '#site/next-data/providers/websiteFeeds' ;
44import { siteConfig } from '#site/next.json.mjs' ;
5- import { defaultLocale } from '#site/next.locales.mjs' ;
5+ import { availableLocaleCodes } from '#site/next.locales.mjs' ;
66
77type DynamicStaticPaths = { locale : string ; feed : string } ;
88type StaticParams = { params : Promise < DynamicStaticPaths > } ;
@@ -26,10 +26,12 @@ export const GET = async (_: Request, props: StaticParams) => {
2626// `[locale]/feeds/[feed]` and returns an array of all available static paths
2727// This is used for ISR static validation and generation
2828export const generateStaticParams = async ( ) =>
29- siteConfig . rssFeeds . map ( feed => ( {
30- locale : defaultLocale . code ,
31- feed : feed . file ,
32- } ) ) ;
29+ availableLocaleCodes . flatMap ( locale =>
30+ siteConfig . rssFeeds . map ( feed => ( {
31+ locale : locale ,
32+ feed : feed . file ,
33+ } ) )
34+ ) ;
3335
3436// Enforces that only the paths from `generateStaticParams` are allowed, giving 404 on the contrary
3537// @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ const BlogHeader: FC<BlogHeaderProps> = ({ category }) => {
2121 { t ( 'layouts.blog.title' ) }
2222 < Link
2323 href = { `/feed/${ currentFile } ` }
24- { ...{ locale : 'en' } } // RSS feeds only exist in English
2524 aria-label = { t ( 'components.blog.blogHeader.rssLink' ) }
2625 >
2726 < RssIcon />
You can’t perform that action at this time.
0 commit comments