Writing

Astro Relaunch

How I finally - after more than 15 years - relaunched my website using Astro and Claude Code .

This is the obligatory “how I relaunched my website” article. When I started freelancing back in 2007, I started on Blogger. In 2010, I moved to Jekyll on GitHub Pages (importing all my content from Blogger). Jekyll and its dependencies got harder and harder to maintain and that led to my last article being written more than 10 years ago, in 2014. I always loved writing, but I hated wrestling with dependencies and broken build processes just to write a new post.

So the search for something new began. I wanted it to be easy and low-friction to write. But I also wanted it to be customizable and I wanted to own my content - something I loved about Jekyll and GitHub Pages. I looked at Ghost – nice clean interface, but felt like it was hemming me in too much. I looked at Gatsby – I actually started converting to Gatsby, but then came across the easier and more powerful Astro. I thought about Medium – great social features and editor, but the constant paywalls were a no-go. Everything had its pros and cons.

Then a couple of years ago I came across Astro and it checked all the boxes: It had typing (something Ruby-based Jekyll was lacking), a great API, a simple approach to adding content, active community, great documentation, and full customizability when I wanted it.

So in 2023 I started to rebuild my site on top of Astro. I got pretty far, but then was pulled into some new projects and put it back on the backburner.

This weekend I finally decided to bring it across the finish line: With the help of Claude Code. It was a pure delight. Claude helped me to update from Astro 4 to 5, it helped me to create a Speaking and Writing section. It helped me design (but not write!) my About page. It created the GitHub Actions workflow to build and deploy my site. It was a fantastic companion in getting the styling of tables, callouts, code samples, lists, and anything else I wanted just right.

So take one last look at what my old website looked like:

Old website screenshot showing the Jekyll-based design

You can look at the complete source code of my website and Astro setup on my public GitHub repo.

Writing Features Showcase

One of the things I’m most excited about is how easy it now is to create articles that look exactly the way I want them to. Here’s a showcase of the markdown features now available:

Syntax Highlighting

Code blocks now have beautiful syntax highlighting with dual light/dark theme support:

class NetworkManager {
    private let session = URLSession.shared

    func fetch<T: Codable>(
        from url: URL, 
        type: T.Type
    ) async throws -> T {
        let (data, _) = try await session.data(from: url)
        return try JSONDecoder().decode(type, from: data)
    }
}

Callout Components

I can now easily use different types of callouts to highlight important information:

ℹ️ Information

This is an informational callout. Perfect for providing additional context or helpful information.

💡 Pro Tip

Here’s a helpful tip that can save you time or improve your workflow. These are great for sharing best practices!

⚠️ Important Warning

Use warning callouts to highlight potential pitfalls or important considerations that readers should be aware of.

Success

Success callouts are perfect for highlighting positive outcomes, achievements, or when something works well.

Enhanced Code Blocks

For more complex code examples, I can use the CodeBlock component with titles, filenames, and language labels:

api.ts API Helper
typescript
interface User {
    id: number;
    name: string;
    email: string;
}

export async function fetchUser(id: number): Promise<User> {
    const response = await fetch(`/api/users/${id}`);
    
    if (!response.ok) {
        throw new Error('Failed to fetch user');
    }
    
    return response.json();
}

export async function createUser(userData: Omit<User, 'id'>) {
    const response = await fetch('/api/users', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(userData),
    });
    
    return response.json();
}

Lists and Tables

Lists now have proper styling with accent-colored markers:

Unordered Lists:

  • Feature one
  • Feature two
    • Nested item
    • Another nested item
  • Feature three

Ordered Lists:

  1. First step
  2. Second step
  3. Third step

And tables have nice headers and styling:

FeatureSupportedNotes
Syntax HighlightingVia Shiki with dual themes
CalloutsFive different types
Enhanced Code BlocksWith titles and filenames
TablesWith proper styling
ListsAccent-colored markers

Combining Elements

I can even combine callouts with code examples:

💡 Code Organization Best Practice

Use MARK comments to organize Swift code:

// MARK: - Properties
private let manager: NetworkManager
private var isLoading = false

// MARK: - Methods
func loadData() async {
    isLoading = true
    // Implementation here
    isLoading = false
}

This makes your code much more readable and maintainable!

I intend to write more and more often, now that it’s frictionless and fun again!