Replies: 4 comments 1 reply
-
Hi @StarpTech . Based on the description and requirements above you should be able to achieve that by removing the Adjusting
|
Beta Was this translation helpful? Give feedback.
-
Hi @Tudes thanks for the hint I didn't test it yet but |
Beta Was this translation helpful? Give feedback.
-
You could approach this with the help of a component. // components/layout.js
import Head from "next/head";
export default function Layout({ title, children }) {
return (
<>
<Head>
<title>{title}</title>
</Head>
{children}
</>
);
} <!-- pages/privacy.mdx -->
import Layout from "../components/layout";
export const title = "Privacy";
<Layout title={title}>
# Privacy Policy
</Layout> |
Beta Was this translation helpful? Give feedback.
-
Seems the standard solution follows from the NextJS MDX docs: // foo.mdx
# Welcome
To my MDX page...
export { default } from '@/src/components/root';
// src/components/root.tsx
import Head from 'next/head'
export default function Root({ children }: { children: React.ReactNode }) {
return (
<>
<Head><title>Foo bar baz</title></Head>
{children}
</>
);
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
Describe the bug
As titled
To Reproduce
Head
as above.Expected behavior
Page title should be
Privacy
System information
Beta Was this translation helpful? Give feedback.
All reactions