console/packages/web/docs/theme.config.tsx
2022-12-28 20:22:54 +01:00

28 lines
799 B
TypeScript

/* eslint sort-keys: error */
import { useRouter } from 'next/router';
import { defineConfig, Giscus, useTheme } from '@theguild/components';
export default defineConfig({
docsRepositoryBase: 'https://github.com/kamilkisiela/graphql-hive/tree/main/packages/web/docs',
main({ children }) {
const { resolvedTheme } = useTheme();
const { route } = useRouter();
return (
<>
{children}
<Giscus
// ensure giscus is reloaded when client side route is changed
key={route}
repo="kamilkisiela/graphql-hive"
repoId="R_kgDOHWr5kA"
category="Docs Discussions"
categoryId="DIC_kwDOHWr5kM4CSDSS"
mapping="pathname"
theme={resolvedTheme}
/>
</>
);
},
siteName: 'HIVE',
});