diff --git a/theme.config.tsx b/theme.config.tsx index 208ee436..b05c2d66 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -4,17 +4,27 @@ import { useRouter } from 'next/router'; import Search from '@components/Search'; function useHead() { + const { asPath } = useRouter(); + const { frontMatter, title } = useConfig(); + const url = `https://overextended.dev${asPath}`; + const description = frontMatter.description || "Documentation for Overextended's resources for FiveM/RedM"; + return ( <> + + + + + ); } function useNextSeoProps() { - const path = useRouter().asPath; - const arr = path.split('/'); + const { asPath } = useRouter(); + const arr = asPath.split('/'); const title = arr[arr.length - 1].replace(/[-_]/g, ' '); return { @@ -53,14 +63,6 @@ const config: DocsThemeConfig = { primaryHue: { dark: 200, light: 200 }, sidebar: { defaultMenuCollapseLevel: 1, - // titleComponent({ title, type }) { - // return ( - // <> - // {title[0].toUpperCase()} - // {title.slice(1)} - // - // ); - // }, }, useNextSeoProps: useNextSeoProps,