Skip to content

Commit 61f6cda

Browse files
committed
docs: add highlight.langs
1 parent 9ee785d commit 61f6cda

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/content/1.get-started/2.configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Nuxt Content uses [Shiki](https://github.com/shikijs/shiki) to provide syntax hi
179179
| Option | Type | Description |
180180
| --------- | :------------------------------------------: | :------------------------------------------------------------------------------------------------------------------ |
181181
| `theme` | `ShikiTheme` or `Record<string, ShikiTheme>` | The [color theme](https://github.com/shikijs/shiki/blob/main/docs/themes.md) to use. |
182-
| `preload` | `ShikiLang[]` | The [preloaded languages](https://github.com/shikijs/shiki/blob/main/docs/languages.md) available for highlighting. |
182+
| `langs` | `ShikiLang[]` | The [loaded languages](https://github.com/shikijs/shiki/blob/main/docs/languages.md) available for highlighting. |
183183

184184
- `highlight.theme`
185185

@@ -209,17 +209,17 @@ export default defineNuxtConfig({
209209
})
210210
```
211211

212-
- `highlight.preload`
212+
- `highlight.langs`
213213

214-
By default, module preloads couple of languages for syntax highlighter: `['diff', 'json', 'js', 'ts', 'css', 'shell', 'html', 'md', 'yaml']`
214+
By default, module loads couple of languages for syntax highlighter: `['json', 'js', 'ts', 'html', 'css', 'vue', 'shell', 'mdc', 'md', 'yaml']`
215215

216216
If you plan to use code samples of other languages, you need to define the language in these options.
217217

218218
```ts
219219
export default defineNuxtConfig({
220220
content: {
221221
highlight: {
222-
preload: [
222+
langs: [
223223
'c',
224224
'cpp',
225225
'java'
@@ -237,7 +237,7 @@ import { readFileSync } from 'node:fs'
237237
export default defineNuxtConfig({
238238
content: {
239239
highlight: {
240-
preload: [
240+
langs: [
241241
// Read more about Shiki languages: https://shiki.style/guide/load-lang
242242
JSON.parse(
243243
readFileSync('./shiki/languages/gdscript.tmLanguage.json', 'utf-8'),

0 commit comments

Comments
 (0)