Skip to content

Commit a9a4694

Browse files
feat: Add Bun docs (#7858)
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent fee5c1a commit a9a4694

File tree

25 files changed

+119
-13
lines changed

25 files changed

+119
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"js-cookie": "^3.0.5",
6060
"js-yaml": "^3.0.0",
6161
"jsdom": "^22.1.0",
62-
"platformicons": "^5.6.0",
62+
"platformicons": "^5.6.4",
6363
"prism-sentry": "^1.0.2",
6464
"prismjs": "^1.27.0",
6565
"query-string": "^6.13.1",

src/components/guideGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function GuideGrid({platform, className}: Props) {
2626
<li key={guide.key}>
2727
<SmartLink to={guide.url}>
2828
<PlatformIcon
29-
platform={guide.key}
29+
platform={guide.icon ?? guide.key}
3030
style={{marginRight: '0.5rem', border: 0, boxShadow: 'none'}}
3131
format="sm"
3232
/>

src/components/hooks/usePlatform.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const query = graphql`
1717
title
1818
url
1919
sdk
20+
icon
2021
caseStyle
2122
supportLevel
2223
fallbackPlatform
@@ -26,6 +27,7 @@ const query = graphql`
2627
name
2728
title
2829
url
30+
icon
2931
sdk
3032
caseStyle
3133
supportLevel

src/components/navbarPlatformDropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function NavbarPlatformDropdown() {
1414
currentPlatform ? (
1515
<Fragment>
1616
<PlatformIcon
17-
platform={currentPlatform.key}
17+
platform={currentPlatform.icon ?? currentPlatform.key}
1818
size={16}
1919
style={{marginRight: '0.5rem'}}
2020
format="sm"
@@ -36,7 +36,7 @@ export function NavbarPlatformDropdown() {
3636
to={platform.url}
3737
>
3838
<PlatformIcon
39-
platform={platform.key}
39+
platform={platform.icon ?? platform.key}
4040
size={16}
4141
style={{marginRight: '0.5rem'}}
4242
format="sm"

src/components/platformGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function PlatformGrid({noGuides = false}: Props) {
7676
<SmartLink to={platform.url}>
7777
<PlatformIcon
7878
size={82}
79-
platform={platform.key}
79+
platform={platform.icon ?? platform.key}
8080
format="lg"
8181
style={{maxWidth: 'none', border: 0, boxShadow: 'none'}}
8282
/>

src/components/platformLinkWithLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function PlatformLinkWithLogo({platform, label, url}: Props) {
2121
<SmartLink to={url}>
2222
<PlatformIcon
2323
size={20}
24-
platform={currentPlatform.key}
24+
platform={currentPlatform.icon ?? currentPlatform.key}
2525
style={{
2626
marginRight: '0.5rem',
2727
marginTop: '0.2rem',

src/data/platforms.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,6 @@
107107
type: language
108108
name: Dart
109109
case_style: camelCase
110+
- slug: bun
111+
type: framework
112+
name: Bun

src/gatsby/createSchemaCustomization/platformSchema.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const getPlatformTypeDefs = () => {
3131
categories: [PlatformCategory!]
3232
url: String!
3333
fallbackPlatform: String!
34+
icon: String
3435
}
3536
3637
type Platform implements Node {
@@ -44,6 +45,7 @@ export const getPlatformTypeDefs = () => {
4445
categories: [PlatformCategory!]
4546
url: String!
4647
fallbackPlatform: String
48+
icon: String
4749
}
4850
`,
4951
];

src/pages/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ function IndexPage() {
128128
{visiblePlatforms.map(platform => (
129129
<SmartLink to={platform.url} className="hover-card-link" key={platform.key}>
130130
<div className="image-frame">
131-
<PlatformIcon size={48} platform={platform.key} format="lg" />
131+
<PlatformIcon
132+
size={48}
133+
platform={platform.icon ?? platform.key}
134+
format="lg"
135+
/>
132136
</div>
133137
{platform.title}
134138
</SmartLink>

src/pages/platform-redirect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function BasePlatformRedirect({path = '/'}: Props) {
2929
<SmartLink to={`/platforms/${platform.key}${path}`}>
3030
<PlatformIcon
3131
size={16}
32-
platform={platform.key}
32+
platform={platform.icon ?? platform.key}
3333
style={{marginRight: '0.5rem'}}
3434
format="sm"
3535
/>

0 commit comments

Comments
 (0)