import { useRouter } from "next/router"; import { type DocsThemeConfig, useConfig } from "nextra-theme-docs"; import faviconFormats from "./favicon-formats"; import styles from "./global.module.css"; const NO_INDEX_FOLLOW = process.env.CF_PAGES_BRANCH !== "main"; const config: DocsThemeConfig = { logo: ( hyperglass ), useNextSeoProps: () => { const { asPath } = useRouter(); const { frontMatter, title } = useConfig(); return { titleTemplate: "%s | hyperglass", title: frontMatter.title || title, openGraph: { type: "website", url: `https://hyperglass.dev${asPath}`, title: frontMatter.title || title, description: frontMatter.description || "hyperglass Documentation", images: [ { url: "https://hyperglass.dev/opengraph.jpg", width: 1200, height: 630, alt: "hyperglass", }, ], }, twitter: { handle: "@thatmattlove", site: "@thatmattlove", cardType: "summary_large_image", }, noindex: NO_INDEX_FOLLOW, nofollow: NO_INDEX_FOLLOW, additionalLinkTags: faviconFormats.map((fmt) => { const { image_format, dimensions, prefix, rel } = fmt; const [w, h] = dimensions; const href = `/img/${prefix}-${w}x${h}.${image_format}`; return { rel: rel ?? "", href, type: `image/${image_format}` }; }), }; }, banner: { dismissible: true, // text: "🎉 hyperglass 2.0 is here!", text: "😬 hyperglass 2.0 and its documentation is still in development!", }, feedback: { content: null }, footer: { text: `© ${new Date().getFullYear()} hyperglass` }, editLink: { component: null }, chat: { link: "https://netdev.chat/", icon: ( NetDev Chat ), }, project: { link: "https://github.com/thatmattlove/hyperglass", }, }; export default config;