Code
Code blocks with highlighting and a copy button.
Fence code with three backticks and name the language for highlighting. Every block gets a Copy button.
export async function getPage(slug: string) {
const res = await fetch(`/api/v1/pages/${slug}`);
return (await res.json()).page;
}
```ts
const page = await getPage("quickstart");
```
Common names are bash, json, ts, js, tsx, html, css, python, yaml and markdown. Use inline code for short things a reader types.