Welcome to Astro
Welcome to my new blog! This site is built with Astro and deployed on Cloudflare Pages.
Why Astro?
- Zero JavaScript shipped to the browser by default
- Component-based templating (familiar if you know React)
- Write posts in Markdown with type-safe frontmatter
- Add interactivity later with “islands” if needed
How this works
I just create a new .md file in src/content/blog/, push to Git, and Cloudflare Pages rebuilds automatically. The frontpage list and navigation update by themselves.
The filename becomes the URL: welcome-to-astro.md → /blog/welcome-to-astro/.
That’s it. Simple.
Syntax Highlighting
Code blocks are automatically colored using Shiki:
function greet(name) {
console.log(`Hello, ${name}!`);
return `Welcome to ${name}'s site.`;
}
greet('World');
def greet(name):
print(f"Hello, {name}!")
return f"Welcome to {name}'s site."
greet("World")
The theme automatically switches between light and dark based on your system preference or the toggle in the header.