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
Adds a `markdown.shikiConfig.langAlias` option that allows [aliasing a non-supported code language to a known language](https://shiki.style/guide/load-lang#custom-language-aliases). This is useful when the language of your code samples is not [a built-in Shiki language](https://shiki.style/languages), but you want your Markdown source to contain an accurate language while also displaying syntax highlighting.
7
+
8
+
The following example configures Shiki to highlight `cjs` code blocks using the `javascript` syntax highlighter:
9
+
10
+
```js
11
+
import { defineConfig } from'astro/config';
12
+
13
+
exportdefaultdefineConfig({
14
+
markdown: {
15
+
shikiConfig: {
16
+
langAlias: {
17
+
cjs:'javascript',
18
+
},
19
+
},
20
+
},
21
+
});
22
+
```
23
+
24
+
Then in your Markdown, you can use the alias as the language for a code block for syntax highlighting:
0 commit comments