Skip to content

Commit c0edd63

Browse files
author
Dimitri POSTOLOV
authored
fix page title for remote content (#370)
1 parent 4f6007e commit c0edd63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nextra-theme/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const mdxStyles: ThemeUIStyleObject = {
6161
export { Heading, Image, Link, LinkInline, Paragraph }
6262

6363
export default function NextraLayout({ children, pageOpts }: NextraThemeLayoutProps): ReactElement {
64-
const { frontMatter, filePath, pageMap, headings } = pageOpts
64+
const { frontMatter, filePath, pageMap, headings, title } = pageOpts
6565
const { locale, defaultLocale } = useI18n()
6666
const fsPath = useFSRoute()
6767

@@ -123,7 +123,7 @@ export default function NextraLayout({ children, pageOpts }: NextraThemeLayoutPr
123123
}, [headings, outlineItemIsInOrAboveView])
124124

125125
let seo: NextSeoProps = {
126-
title: `${frontMatter.title ? `${frontMatter.title} - ` : ''}The Graph Docs`,
126+
title: `${title ? `${title} - ` : ''}The Graph Docs`,
127127
}
128128
if (frontMatter.description) {
129129
seo.description = frontMatter.description

0 commit comments

Comments
 (0)