File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { NextResponse } from 'next/server';
2
2
3
3
import provideWebsiteFeeds from '#site/next-data/providers/websiteFeeds' ;
4
4
import { siteConfig } from '#site/next.json.mjs' ;
5
- import { availableLocaleCodes } from '#site/next.locales.mjs' ;
5
+ import { defaultLocale } from '#site/next.locales.mjs' ;
6
6
7
7
type DynamicStaticPaths = { locale : string ; feed : string } ;
8
8
type StaticParams = { params : Promise < DynamicStaticPaths > } ;
@@ -26,12 +26,10 @@ export const GET = async (_: Request, props: StaticParams) => {
26
26
// `[locale]/feeds/[feed]` and returns an array of all available static paths
27
27
// This is used for ISR static validation and generation
28
28
export const generateStaticParams = async ( ) =>
29
- availableLocaleCodes . flatMap ( locale =>
30
- siteConfig . rssFeeds . map ( feed => ( {
31
- locale : locale ,
32
- feed : feed . file ,
33
- } ) )
34
- ) ;
29
+ siteConfig . rssFeeds . map ( feed => ( {
30
+ locale : defaultLocale . code ,
31
+ feed : feed . file ,
32
+ } ) ) ;
35
33
36
34
// Enforces that only the paths from `generateStaticParams` are allowed, giving 404 on the contrary
37
35
// @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,6 +21,7 @@ const BlogHeader: FC<BlogHeaderProps> = ({ category }) => {
21
21
{ t ( 'layouts.blog.title' ) }
22
22
< Link
23
23
href = { `/feed/${ currentFile } ` }
24
+ { ...{ locale : 'en' } } // RSS feeds only exist in English
24
25
aria-label = { t ( 'components.blog.blogHeader.rssLink' ) }
25
26
>
26
27
< RssIcon />
You can’t perform that action at this time.
0 commit comments