Skip to content

Commit

Permalink
update blog comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-Mcat committed Aug 18, 2024
1 parent 11c0652 commit 6f88f1b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/theme/DocItem/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react";
import DocItemFooter from "@theme-original/DocItem/Footer";
import type DocItemFooterType from "@theme/DocItem/Footer";
import type { WrapperProps } from "@docusaurus/types";
import { useDoc } from "@docusaurus/theme-common/internal";
import GiscusComponent from "@site/src/components/GiscusComponent";

type Props = WrapperProps<typeof DocItemFooterType>;

export default function DocItemFooterWrapper(props: Props): JSX.Element {
const { metadata } = useDoc();
const { comments = true } = metadata.frontMatter;

return (
<>
<DocItemFooter {...props} />
{comments && <GiscusComponent />}
</>
);
}

0 comments on commit 6f88f1b

Please sign in to comment.