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';
22
33import provideWebsiteFeeds from '#site/next-data/providers/websiteFeeds' ;
44import { siteConfig } from '#site/next.json.mjs' ;
5- import { availableLocaleCodes } from '#site/next.locales.mjs' ;
5+ import { defaultLocale } from '#site/next.locales.mjs' ;
66
77type DynamicStaticPaths = { locale : string ; feed : string } ;
88type StaticParams = { params : Promise < DynamicStaticPaths > } ;
@@ -26,12 +26,10 @@ 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- 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+ } ) ) ;
3533
3634// Enforces that only the paths from `generateStaticParams` are allowed, giving 404 on the contrary
3735// @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 }) => {
2121 { t ( 'layouts.blog.title' ) }
2222 < Link
2323 href = { `/feed/${ currentFile } ` }
24+ { ...{ locale : 'en' } } // RSS feeds only exist in English
2425 aria-label = { t ( 'components.blog.blogHeader.rssLink' ) }
2526 >
2627 < RssIcon />
You can’t perform that action at this time.
0 commit comments