diff --git a/documentation/docs/theme.config.tsx b/documentation/docs/theme.config.tsx index 3acf475992..bf09e0cf32 100644 --- a/documentation/docs/theme.config.tsx +++ b/documentation/docs/theme.config.tsx @@ -1,14 +1,51 @@ import React from "react"; -import { DocsThemeConfig } from "nextra-theme-docs"; +import { DocsThemeConfig, useConfig } from "nextra-theme-docs"; import { Footer } from "./components/footer"; import { Matrix } from "./components/matrix-link"; import { useRouter } from "next/router"; const config: DocsThemeConfig = { - useNextSeoProps() { - return { - titleTemplate: "%s – Nym Docs", - }; + head: function useHead() { + const config = useConfig() + const { route } = useRouter() + const isDefault = route === '/' || !config.title + const image = 'https://nymtech.net/nym_logo.jpg' + + const description = + config.frontMatter.description || + 'Join the privacy ecosystem' + const title = config.title + (route === '/' ? '' : ' - Nym docs') + + return ( + <> + {title} + + + + + + + + + + + + + + + + + ) }, logo: Nym Docs, project: {