mirror of
https://github.com/SantaSpeen/santaspeen.ru-blog.git
synced 2026-05-20 00:20:28 +00:00
add comments giscus
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import React from 'react';
|
||||
import BlogPostItem from '@theme-original/BlogPostItem';
|
||||
import { useBlogPost } from "@docusaurus/theme-common/internal";
|
||||
import Giscus from "@giscus/react";
|
||||
|
||||
export default function BlogPostItemWrapper(props) {
|
||||
const { isBlogPostPage } = useBlogPost();
|
||||
if (!isBlogPostPage) {
|
||||
return <BlogPostItem {...props} />;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<BlogPostItem {...props} />
|
||||
{(
|
||||
<div className="docusaurus-blog-comments">
|
||||
<Giscus
|
||||
repo="akmalovaa/akmalov.com"
|
||||
repoId="R_kgDOI0gPCg"
|
||||
category="General"
|
||||
categoryId="DIC_kwDOI0gPCs4CXR_A"
|
||||
mapping="pathname"
|
||||
reactionsEnabled="1"
|
||||
emitMetadata="0"
|
||||
inputPosition="bottom"
|
||||
theme="dark"
|
||||
lang={'ru'}
|
||||
loading="lazy"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user