mirror of
https://github.com/graphql-hive/console
synced 2026-05-23 09:08:34 +00:00
Implement Giscus (#503)
* add giscus * fix lint * prettify Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
This commit is contained in:
parent
0267d942cf
commit
abae247179
1 changed files with 22 additions and 1 deletions
|
|
@ -1,7 +1,28 @@
|
|||
/* eslint sort-keys: error */
|
||||
import { defineConfig } from '@theguild/components';
|
||||
import { defineConfig, useTheme, Giscus } from '@theguild/components';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
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',
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue