You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Custom version of the code block integration from Astro Docs. "Beautiful code blocks for your Astro site". Applied to the code blocks created in `.mdx` files
#### Code tabs plugin so Javascript and Typescript examples can both be show.
226
-
227
-
There can only be white space between two code blocks. Display name is set by `tabName` and can only contain characters in [A-Za-z0-9_]. Syntax for the first line of the code block is:
228
-
229
-
```js [group:tabName]
230
-
```
231
-
232
-
`markdown-it-codetabs`
233
-
234
-
#### Add copy button to code blocks
235
-
236
-
`markdown-it-copy`
237
-
238
-
Options for "copy" button added to code blocks
239
-
240
-
```javascript
241
-
constmarkdownCodeCopyConfig= {
242
-
/** Text shown on copy button */
243
-
btnText:`Copy`,
244
-
/** Text shown on copy failure */
245
-
failText:`Copy Failed`,
246
-
/** Text shown on copy success */
247
-
successText:`Success!`, // 'copy success' | copy-success text
248
-
/** Amount of time to show success message */
249
-
successTextDelay:2000,
250
-
/** An HTML fragment included before <button> */
251
-
extraHtmlBeforeBtn:``,
252
-
/** An HTML fragment included after <button> */
253
-
extraHtmlAfterBtn:``,
254
-
/** Whether to show code language before the copy button */
255
-
showCodeLanguage:false,
256
-
/** Test to append after the copied text like a copyright notice */
0 commit comments