Skip to content

Commit

Permalink
Add meta task for rss auto-discovery (#6805)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii authored Apr 26, 2024
1 parent 537bd05 commit 8c1c6e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/Layout/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type {RouteItem} from 'components/Layout/getRouteMeta';
import {HomeContent} from './HomeContent';
import {TopNav} from './TopNav';
import cn from 'classnames';
import Head from 'next/head';

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

Expand Down Expand Up @@ -117,6 +118,16 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
image={`/images/og-` + section + '.png'}
searchOrder={searchOrder}
/>
{(isHomePage || isBlogIndex) && (
<Head>
<link
rel="alternate"
type="application/rss+xml"
title="React Blog RSS Feed"
href="/rss.xml"
/>
</Head>
)}
<SocialBanner />
<TopNav
section={section}
Expand Down

0 comments on commit 8c1c6e3

Please sign in to comment.