chore: optional git url in homepage client libs (#38949)

This commit is contained in:
Alaister Young
2025-09-24 20:10:24 +08:00
committed by GitHub
parent db918bda3a
commit 1c092d2d05
3 changed files with 10 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ interface ClientLibraryProps {
language: string
officialSupport?: boolean
docsUrl?: string
gitUrl: string
gitUrl?: string
altIconName?: string
}
@@ -50,11 +50,13 @@ const ClientLibrary = ({
</Button>
</a>
)}
<a href={gitUrl} target="_blank" rel="noreferrer">
<Button icon={<Github />} type="default">
<span className="hidden md:inline">See</span> GitHub
</Button>
</a>
{gitUrl && (
<a href={gitUrl} target="_blank" rel="noreferrer">
<Button icon={<Github />} type="default">
<span className="hidden md:inline">See</span> GitHub
</Button>
</a>
)}
</div>
</div>
</div>

View File

@@ -15,7 +15,7 @@ export type CustomContentTypes = {
officialSupport: boolean
releaseState?: string
docsUrl: string
gitUrl: string
gitUrl?: string
altIconName?: string
}[]
projectHomepageExampleProjects: {

View File

@@ -44,7 +44,7 @@
"gitUrl": { "type": "string" },
"altIconName": { "type": "string" }
},
"required": ["language", "officialSupport", "docsUrl", "gitUrl"]
"required": ["language", "officialSupport", "docsUrl"]
}
},
"project_homepage:example_projects": {