Skip to content

Commit 8c1c6e3

Browse files
authored
Add meta task for rss auto-discovery (#6805)
1 parent 537bd05 commit 8c1c6e3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/components/Layout/Page.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import type {RouteItem} from 'components/Layout/getRouteMeta';
2121
import {HomeContent} from './HomeContent';
2222
import {TopNav} from './TopNav';
2323
import cn from 'classnames';
24+
import Head from 'next/head';
2425

2526
import(/* webpackPrefetch: true */ '../MDX/CodeBlock/CodeBlock');
2627

@@ -117,6 +118,16 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
117118
image={`/images/og-` + section + '.png'}
118119
searchOrder={searchOrder}
119120
/>
121+
{(isHomePage || isBlogIndex) && (
122+
<Head>
123+
<link
124+
rel="alternate"
125+
type="application/rss+xml"
126+
title="React Blog RSS Feed"
127+
href="/rss.xml"
128+
/>
129+
</Head>
130+
)}
120131
<SocialBanner />
121132
<TopNav
122133
section={section}

0 commit comments

Comments
 (0)