Code

Code blocks render syntax-highlighted code using Expressive Code with bundled Night Owl dark and light themes.

Block type

code

Fields

FieldTypeDescription
`language`stringLanguage identifier (e.g. `ts`, `bash`, `json`, `css`)
`code`stringThe code content

Markdown mode

In markdown mode, code blocks use standard fenced code block syntax:

```ts
const greeting = "Hello, Star-Lite!";
console.log(greeting);
```

The language identifier after the opening fence determines syntax highlighting.

Supported languages

Expressive Code supports all languages that Shiki supports, including: ts, js, tsx, jsx, html, css, json, bash, sh, yaml, md, mdx, sql, python, rust, go, java, c, cpp, and many more.

Themes

Star-Lite bundles Night Owl dark and light themes by default. You can customize this via the expressiveCode option in configuration:

starLiteDocs({
expressiveCode: {
themes: ["dracula", "github-light"],
},
});

Set expressiveCode: false to disable the bundled integration entirely.