Skip to content
Celestia Theme

Code Blocks

The theme replaces Starlight’s built-in Expressive Code with a custom Shiki pipeline for syntax highlighting.

Use fenced code blocks with a language identifier:

interface User {
  name: string;
  email: string;
  role: "admin" | "user";
}

function greet(user: User): string {
  return `Hello, ${user.name}!`;
}

Highlight specific lines using the {lines} syntax in the code fence meta:

const config = {
  theme: "celestia",
  sidebar: true,
  multiSidebar: true,
};

Use // [!code ++] and // [!code --] for diff annotations:

const config = {
  theme: "nova", 
  theme: "celestia", 
};

Code blocks use one-light in light mode.

Code blocks use github-dark-dimmed in dark mode.

Both themes are loaded simultaneously and toggled via CSS based on the active theme.