File tree 6 files changed +48
-2
lines changed
6 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' nextra ' : minor
3
+ ' nextra-theme-docs ' : minor
4
+ ' nextra-theme-blog ' : minor
5
+ ---
6
+
7
+ Added golang logo for code blocks.
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export function Pre({
52
52
'_border-b-0'
53
53
) }
54
54
>
55
- { Icon && < Icon className = "_h-4 _w-auto _shrink-0" /> }
55
+ { Icon && < Icon className = "_h-4 _w-auto _max-w-6 _shrink-0" /> }
56
56
< span className = "_truncate" > { filename } </ span >
57
57
{ copyButton }
58
58
</ div >
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export { ReactComponent as DiscordIcon } from './discord.svg'
5
5
export { ReactComponent as ExpandIcon } from './expand.svg'
6
6
export { ReactComponent as GitHubIcon } from './github.svg'
7
7
export { ReactComponent as GlobeIcon } from './globe.svg'
8
+ export { ReactComponent as GoIcon } from './go.svg'
8
9
export { ReactComponent as InformationCircleIcon } from './information-circle.svg'
9
10
export { ReactComponent as MenuIcon } from './menu.svg'
10
11
export { ReactComponent as MoonIcon } from './moon.svg'
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ describe('rehypeIcon', () => {
91
91
import { RustIcon } from 'nextra/icons'
92
92
import { TerraformIcon } from 'nextra/icons'
93
93
import { MoveIcon } from 'nextra/icons'
94
+ import { GoIcon } from 'nextra/icons'
94
95
function _createMdxContent(props) {
95
96
const _components = {
96
97
code: 'code',
@@ -231,6 +232,20 @@ describe('rehypeIcon', () => {
231
232
<_components.span> </_components.span>
232
233
</_components.code>
233
234
</_components.pre>
235
+ {'\\n'}
236
+ <_components.pre icon={GoIcon} tabIndex="0" data-language="go" data-word-wrap="" data-copy="">
237
+ <_components.code>
238
+ <_components.span> </_components.span>
239
+ </_components.code>
240
+ </_components.pre>
241
+ {'\\n'}
242
+ <_components.pre icon={GoIcon} tabIndex="0" data-language="golang" data-word-wrap="" data-copy="">
243
+ <_components.code>
244
+ <_components.span>
245
+ <_components.span />
246
+ </_components.span>
247
+ </_components.code>
248
+ </_components.pre>
234
249
</>
235
250
)
236
251
}
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ export const REHYPE_ICON_DEFAULT_REPLACES: Record<string, string> = {
25
25
rs : 'RustIcon' ,
26
26
terraform : 'TerraformIcon' ,
27
27
tf : 'TerraformIcon' ,
28
- move : 'MoveIcon'
28
+ move : 'MoveIcon' ,
29
+ go : 'GoIcon' ,
30
+ golang : 'GoIcon'
29
31
}
30
32
31
33
function createImport ( iconName : string ) {
You can’t perform that action at this time.
0 commit comments