mirror of
https://github.com/SantaSpeen/santaspeen.ru-blog.git
synced 2026-05-19 16:10:16 +00:00
41 lines
1017 B
TypeScript
41 lines
1017 B
TypeScript
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} />;
|
|
}
|
|
|
|
const repo = "SantaSpeen/santaspeen.ru-blog"
|
|
const repoId = "R_kgDOK6Fd_Q"
|
|
const category = "General"
|
|
const categoryId = "DIC_kwDOK6Fd_c4Cbwpe"
|
|
|
|
return (
|
|
<>
|
|
<BlogPostItem {...props} />
|
|
{(
|
|
<div className="docusaurus-blog-comments">
|
|
<Giscus
|
|
repo={repo}
|
|
repoId={repoId}
|
|
category={category}
|
|
categoryId={categoryId}
|
|
mapping="pathname"
|
|
reactionsEnabled="1"
|
|
emitMetadata="0"
|
|
inputPosition="bottom"
|
|
theme="dark"
|
|
lang={'ru'}
|
|
loading="lazy"
|
|
/>
|
|
</div>
|
|
)}
|
|
</>
|
|
);
|
|
}
|