Repo Card
About 314 wordsAbout 1 min
2025-10-08
Overview
The Repo Card component is used to display GitHub/Gitee repository information.
Usage
To use this component, you need to manually import the RepoCard
component:
<!-- Import in markdown -->
<script setup>
import RepoCard from 'vuepress-theme-plume/features/RepoCard.vue'
</script>
<!-- After importing, you can use it in markdown -->
<RepoCard repo="pengzhanbo/vuepress-theme-plume" />
Register as a global component:
.vuepress/client.ts
import RepoCard from 'vuepress-theme-plume/features/RepoCard.vue'
import { defineClientConfig } from 'vuepress/client'
export default defineClientConfig({
enhance({ app }) {
app.component('RepoCard', RepoCard)
},
})
Global components can be used in any other markdown file:
<RepoCard repo="pengzhanbo/vuepress-theme-plume" />
Props
repoRequiredstring
Repository address in owner/repo
format
providerOptionalgithub | gitee
'github'
Repository platform. Currently only github
/gitee
are supported.
fullnameOptionalboolean
Whether to display the full repository name.
The full repository name is owner/repo
.
- If the owner is an individual, the full repository name is not displayed by default, only
repo
is shown. - If the owner is an organization, the full repository name is displayed by default.
Examples
Single Card
Input:
<RepoCard repo="pengzhanbo/vuepress-theme-plume" />
Output:
Multiple Cards
If you want to display multiple cards side by side in a compact way, you can use the CardGrid
component.
Input:
<CardGrid>
<RepoCard repo="vuepress/core" />
<RepoCard repo="vuepress/ecosystem" />
</CardGrid>
Output:
Input:
<CardGrid>
<RepoCard repo="pengzb/vuepress-theme-plume" provider="gitee" />
<RepoCard repo="pengzb/vite-plugin-mock-dev-server" provider="gitee" />
</CardGrid>
Output:
Contributors
Changelog
10/9/25, 7:46 AM
View All Changelog
38505
-docs: update en docs (#708)on4d236
-feat(theme)!: add collections support (#704)on94e75
-feat(theme): add gitee provider support for repocard, close #674 (#675)on49d84
-feat(theme): addfullname
prop support forRepoCard
, close #669 (#670)ond1496
-docs: update docson0fd6c
-refactor(theme): improve types and flat config (#524)on597a1
-style: lint fixone3b1c
-docs: improve docsonac898
-docs: update docson