First Post

Testing the Hugo + Tailwind static blog stack with light/dark mode and AI-friendly outputs.

This is your first post. It’s here mainly to confirm that:

  • Tailwind classes are being purged correctly.
  • Light/dark mode responds to your system theme by default.
  • JSON-LD, OpenGraph, RSS, and the /embeddings.json output are all being generated.
  • Syntax highlighting works with both light and dark themes.

Code Examples

Here are some code examples to demonstrate syntax highlighting:

Go

package main

import "fmt"

func main() {
    for i := 0; i < 3; i++ {
        fmt.Println("Value of i:", i)
    }
}

Python

def fibonacci(n):
    """Calculate fibonacci number recursively."""
    if n <= 1:
        return n
    return fibonacci(n - 1) + fibonacci(n - 2)

# Generate first 10 fibonacci numbers
for i in range(10):
    print(f"F({i}) = {fibonacci(i)}")

JavaScript

// Async function to fetch user data
async function fetchUserData(userId) {
    try {
        const response = await fetch(`/api/users/${userId}`);
        const data = await response.json();
        return data;
    } catch (error) {
        console.error('Error fetching user:', error);
        throw error;
    }
}

// Example usage
fetchUserData(42).then(user => {
    console.log('User:', user.name);
});

Bash

#!/bin/bash

# Deploy script
echo "Starting deployment..."

hugo --minify
aws s3 sync public/ s3://my-bucket/ --delete
aws cloudfront create-invalidation --distribution-id E123456 --paths "/*"

echo "Deployment complete!"

Common Questions

Is this site fully static?
Yes. Hugo generates static HTML and assets; no server-side runtime is required.
How is light/dark mode handled?
Tailwind's dark mode class is toggled based on system preference and an optional user override persisted in localStorage.