import styles from './global.module.css'; import { useRouter } from 'next/router'; import { useConfig, type DocsThemeConfig } from 'nextra-theme-docs'; import faviconFormats from './favicon-formats'; const NO_INDEX_FOLLOW = process.env.CF_PAGES_BRANCH !== 'main'; const config: DocsThemeConfig = { logo: ( ), 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!', }, feedback: { content: null }, footer: { text: `© ${new Date().getFullYear()} hyperglass` }, chat: { link: 'https://netdev.chat/', icon: ( ), }, project: { link: 'https://github.com/thatmattlove/hyperglass', }, }; export default config;