Skip to content

Commit

Permalink
✨ [docs] Add Giscus comments to Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-liu committed Jun 21, 2024
1 parent 1267fa3 commit ee710bc
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
74 changes: 74 additions & 0 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dependencies": {
"@docusaurus/core": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@giscus/react": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.1",
Expand All @@ -24,6 +25,7 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/tsconfig": "^3.4.0",
"@docusaurus/types": "^3.4.0"
},
"browserslist": {
Expand Down
30 changes: 30 additions & 0 deletions docs/src/theme/DocItem/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { useColorMode } from '@docusaurus/theme-common'
import type { WrapperProps } from '@docusaurus/types'
import Giscus from '@giscus/react'
import Footer from '@theme-original/DocItem/Footer'
import type FooterType from '@theme/DocItem/Footer'

export default function FooterWrapper(props: WrapperProps<typeof FooterType>) {
let { colorMode } = useColorMode()

return (
<>
<Footer {...props} />

<div style={{ height: '56px' }} />
<Giscus
theme={colorMode}
id="giscus"
repo="evan-liu/karabiner.ts"
repoId="R_kgDOJZ587w"
category="giscus"
categoryId="DIC_kwDOJZ58784CgPKB"
mapping="pathname"
reactionsEnabled="1"
inputPosition="bottom"
lang="en"
loading="lazy"
/>
</>
)
}
8 changes: 8 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": ".",
"strict": true,
"importsNotUsedAsValues": "error"
}
}

0 comments on commit ee710bc

Please sign in to comment.