Test post
Code blocks
Here’s a Python function with line highlighting:
def fibonacci(n):
"""Generate the first n Fibonacci numbers."""
a, b = 0, 1
for _ in range(n):
yield a
a, b = b, a + b
list(fibonacci(10))
# [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
And some TypeScript:
type Post = {
title: string;
date: Date;
tags: string[];
draft?: boolean;
};
function getPublishedPosts(posts: Post[]): Post[] {
return posts
.filter((p) => !p.draft)
.sort((a, b) => b.date.getTime() - a.date.getTime());
}
Inline code works too: const x = 42.
Interactive components
React + SVG
Drag the sliders to change frequency and amplitude.
Motion
Spring animations. Click the square.
Three.js
A wireframe cube with orbit controls. Drag to rotate.