docs: add discussions with giscus (#27172)

This commit is contained in:
Erick Friis
2024-10-11 15:14:45 -07:00
committed by GitHub
parent 5647276998
commit 2197958366
4 changed files with 68 additions and 14 deletions

View File

@@ -1,11 +1,25 @@
import React from 'react';
import Paginator from '@theme-original/DocItem/Paginator';
import Feedback from "@theme/Feedback";
import Giscus from "@giscus/react";
export default function PaginatorWrapper(props) {
return (
<>
<Feedback />
<Giscus
repo="langchain-ai/langchain"
repoId="R_kgDOIPDwlg"
category="Docs Discussions"
categoryId="DIC_kwDOIPDwls4CjJYb"
mapping="pathname"
strict="0"
reactionsEnabled="0"
emitMetadata="0"
inputPosition="bottom"
theme="preferred_color_scheme"
lang="en"
loading="lazy" />
<Paginator {...props} />
</>
);

View File

@@ -220,10 +220,6 @@ export default function Feedback() {
onMouseUp: (e) => (e.currentTarget.style.backgroundColor = "#f0f0f0"),
};
const newGithubIssueURL = pathname
? `https://github.com/langchain-ai/langchain/issues/new?assignees=&labels=03+-+Documentation&projects=&template=documentation.yml&title=DOC%3A+%3CIssue+related+to+${pathname}%3E&url=https://python.langchain.com${pathname}`
: "https://github.com/langchain-ai/langchain/issues/new?assignees=&labels=03+-+Documentation&projects=&template=documentation.yml&title=DOC%3A+%3CPlease+write+a+comprehensive+title+after+the+%27DOC%3A+%27+prefix%3E";
return (
<div style={{ display: "flex", flexDirection: "column" }}>
<hr />
@@ -296,14 +292,6 @@ export default function Feedback() {
</div>
</>
)}
<br />
<h4>
You can also leave detailed feedback{" "}
<a target="_blank" href={newGithubIssueURL}>
on GitHub
</a>
.
</h4>
</div>
);
}