--- title: GitHub 信息 description: 显示您的 GitHub 仓库信息 preview: githubInfo --- ## 使用方法 ```tsx import { GithubInfo } from 'fumadocs-ui/components/github-info'; ; ``` 建议将其添加到您的文档布局中,使用 `links` 选项: ```tsx title="app/docs/layout.tsx" import { DocsLayout, type DocsLayoutProps } from 'fumadocs-ui/layouts/notebook'; import type { ReactNode } from 'react'; import { baseOptions } from '@/app/layout.config'; import { source } from '@/lib/source'; import { GithubInfo } from 'fumadocs-ui/components/github-info'; const docsOptions: DocsLayoutProps = { ...baseOptions, tree: source.pageTree, links: [ { type: 'custom', children: ( ), }, ], }; export default function Layout({ children }: { children: ReactNode }) { return {children}; } ```