Repo 卡片
约 307 字大约 1 分钟
2024-07-26
概述
Repo 卡片组件用于显示 GitHub / Gitee 仓库信息。
使用
组件无需注册,主题会自动按需导入 RepoCard 组件。
在 markdown 文件中直接使用即可:
<!-- 在 markdown 中使用 -->
<RepoCard repo="pengzhanbo/vuepress-theme-plume" />Props
Name:repoRequiredType:string
仓库地址,格式为 owner/repo
Name:providerOptionalType:'github' | 'gitee'
Default Value: 'github'
仓库所属平台,当前仅支持 github / gitee 。
Name:fullnameOptionalType:boolean
Default Value: false
是否显示完整的仓库名称。
完整的仓库名称为 owner/repo。
- 如果 owner 为个人,则默认不显示完整的仓库名称,仅显示
repo。 - 如果 owner 为组织,则默认显示完整的仓库名称。
示例
单卡片
输入:
<RepoCard repo="pengzhanbo/vuepress-theme-plume" />输出:
多卡片
如果希望以紧凑的方式并排展示多个卡片,可以使用 CardGrid 组件。
输入:
<CardGrid>
<RepoCard repo="vuepress/core" />
<RepoCard repo="vuepress/ecosystem" />
</CardGrid>输出:
输入:
<CardGrid>
<RepoCard repo="pengzb/vuepress-theme-plume" provider="gitee" />
<RepoCard repo="pengzb/vite-plugin-mock-dev-server" provider="gitee" />
</CardGrid>输出:
贡献者
更新日志
2026/9/9 07:33
查看所有更新日志
1d04d-feat: add builtin auto-import-components (#932)于16c2d-docs: update field container于97a5b-docs: fix typo于4d236-feat(theme)!: add collections support (#704)于94e75-feat(theme): add gitee provider support for repocard, close #674 (#675)于49d84-feat(theme): addfullnameprop support forRepoCard, close #669 (#670)于d1496-docs: update docs于0fd6c-refactor(theme): improve types and flat config (#524)于597a1-style: lint fix于e3b1c-docs: improve docs于
