Skip to content

Commit 4dc7d9d

Browse files
authored
Add 32px margin-top above Giscus (#6426)
1 parent 98ab501 commit 4dc7d9d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

packages/web/docs/src/app/docs/[[...mdxPath]]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ export default async function Page(props: NextPageProps<'...mdxPath'>) {
3737
const result = await importPage(params.mdxPath);
3838
const { default: MDXContent, toc, metadata } = result;
3939
return (
40-
<Wrapper toc={toc} metadata={metadata}>
40+
<Wrapper toc={toc} metadata={metadata} bottomContent={<ConfiguredGiscus />}>
4141
<MDXContent {...props} params={params} />
42-
<ConfiguredGiscus />
4342
</Wrapper>
4443
);
4544
}

packages/web/docs/src/components/configured-giscus.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
import { usePathname } from 'next/navigation';
44
import { Giscus } from '@theguild/components';
55

6-
export function ConfiguredGiscus() {
6+
export function ConfiguredGiscus(props: React.HTMLAttributes<HTMLDivElement>) {
77
const route = usePathname();
88

99
return (
10-
<Giscus
11-
// ensure giscus is reloaded when client side route is changed
12-
key={route}
13-
repo="graphql-hive/platform"
14-
repoId="R_kgDOHWr5kA"
15-
category="Docs Discussions"
16-
categoryId="DIC_kwDOHWr5kM4CSDSS"
17-
mapping="pathname"
18-
/>
10+
<div {...props}>
11+
<Giscus
12+
// ensure giscus is reloaded when client side route is changed
13+
key={route}
14+
repo="graphql-hive/platform"
15+
repoId="R_kgDOHWr5kA"
16+
category="Docs Discussions"
17+
categoryId="DIC_kwDOHWr5kM4CSDSS"
18+
mapping="pathname"
19+
/>
20+
</div>
1921
);
2022
}

0 commit comments

Comments
 (0)