Placeholder content. It shows how a typical how-to post renders.
Table of contents
Open Table of contents
Shell
A few small functions do most of the work:
# jump to a project and open the editor
work() {
cd ~/dev/"$1" && nvim .
}~/.zshrc
Highlighting lines
Mark a line with a [!code highlight] comment:
export function greet(name: string) {
const message = `Hello, ${name}!`;
return message;
}greet.ts
Showing a diff
Use [!code --] and [!code ++] to show what changed:
export function greet(name: string) {
return "Hello, " + name;
return `Hello, ${name}!`;
}
Wrapping up
That’s the whole setup. The code-block features above come from Shiki transformers configured in astro.config.ts.