Color mode

Code

Code with a toolbar — code-enhance

Line numbers, a filename bar, line highlighting, and a copy button.

Source

md
```ts title="hello.ts"
export function hello(name: string): string {
  return `Hello, ${name}`;
}
```

Rendered

hello.ts
export function hello(name: string): string {
  return `Hello, ${name}`;
}

Code tabs — code-tabs

Adjacent code fences with tab="..." become a single tab group.

Source

md
```ts tab="React"
const greeting = "Hello from React";
```
 
```js tab="Vanilla"
console.log("Hello from JavaScript");
```

Rendered

ts
const greeting = "Hello from React";

Code annotations — code-annotations

Use a diff fence with the target language to render additions and removals.

Source

md
```diff js
const kept = true;
+ const added = "new line";
- const removed = false;
```

Rendered

js
const kept = true;
 const added = "new line";
 const removed = false;

Source files — source-files

Publish selected text files as pages, embed the full file, or embed a line range.

Source

md
[[source-file-example.ts]]
 
![[source-file-example.ts]]
 
![[source-file-example.ts#L3-L5]]

Rendered

source-file-example.ts

source-file-example.ts
ts
export const greeting = "Hello from a source file";
 
export function greet(name: string): string {
  return `${greeting}, ${name}!`;
}

source-file-example.ts
ts
export function greet(name: string): string {
  return `${greeting}, ${name}!`;
}

Powered by Riebeckite

Local Graph

Nearby Notes