```html

Building an Automated Technical Blog Pipeline: Infrastructure Setup for Four Domain Properties

What Was Done

This session implemented a comprehensive automated technical blogging system across four properties: queenofsandiego.com, sailjada.com, dangerouscentaur.com, and burialsatseasandiego.com. Each property now has a dedicated tech blog subdomain (tech.[domain].com) that auto-generates posts from Claude development session transcripts, capturing granular technical details of ongoing work without exposing credentials.

System Architecture

The solution consists of three core components:

  • Session Hook: A shell script that executes when development sessions end, capturing transcript data
  • Blog Generator: Python script that parses JSONL session transcripts and generates HTML blog posts
  • Infrastructure Layer: S3 buckets, CloudFront distributions, and DNS records for each tech blog subdomain

Infrastructure Configuration

Certificate Strategy

The implementation leveraged existing wildcard ACM certificates to minimize setup overhead:

  • *.queenofsandiego.com wildcard certificate (existing)
  • *.sailjada.com wildcard certificate (existing)
  • *.dangerouscentaur.com wildcard certificate (created during session)
  • burialsatseasandiego.com certificate with DNS validation at GoDaddy (created during session)

This eliminated the need for four separate certificates and allowed rapid CloudFront distribution creation.

S3 Bucket Configuration

Four S3 buckets were created following standard naming convention:

  • tech-queenofsandiego-com - stores HTML posts and assets for tech.queenofsandiego.com
  • tech-sailjada-com - stores HTML posts and assets for tech.sailjada.com
  • tech-dangerouscentaur-com - stores HTML posts for tech.dangerouscentaur.com
  • tech-burialsatseasandiego-com - stores HTML posts for tech.burialsatseasandiego.com

Each bucket is configured for static website hosting with public read access, and includes a root index.html that lists all published posts with links and publication dates.

CloudFront Distribution Setup

Four CloudFront distributions were created (three new, one leveraging existing wildcard):

  • tech.queenofsandiego.com - new distribution with tech-queenofsandiego-com S3 origin
  • tech.sailjada.com - new distribution with tech-sailjada-com S3 origin
  • tech.dangerouscentaur.com - routed through existing wildcard distribution E2Q4UU71SRNTMB with origin dc-sites bucket (path-based routing)
  • tech.burialsatseasandiego.com - new distribution with tech-burialsatseasandiego-com S3 origin

All distributions use standard caching policies with CloudFront-managed compression enabled for optimal content delivery.

DNS Configuration

DNS records vary by registrar and domain:

  • Route53 (queenofsandiego.com & sailjada.com): CNAME records pointing to CloudFront distribution domain names
  • Namecheap (dangerouscentaur.com): CNAME record for tech subdomain pointing to wildcard distribution
  • GoDaddy (burialsatseasandiego.com): CNAME record with ACM DNS validation record added during certificate setup

Claude Code Integration

The system is integrated into Claude Code's session lifecycle through two configuration files:

Stop Hook Script: ~/.claude/hooks/tech_blog_stop.sh

This executable shell script runs when any Claude development session ends. It:

  • Detects the session ID from Claude's session context
  • Locates the session transcript file in ~/.claude/projects/[project]/sessions/
  • Extracts the project's domain mapping from a configuration file
  • Invokes the Python blog generator with the transcript path and target domain
  • Handles errors gracefully with logging to ~/logs/tech_blog_hook.log

Claude Code Settings: ~/.claude/settings.json

The settings file was updated to register the stop hook, ensuring it executes automatically:

"hooks": {
  "session_stop": "/Users/cb/.claude/hooks/tech_blog_stop.sh"
}

Blog Generator: ~/Documents/repos/tools/tech_blog_generator.py

The Python script performs the core work:

  • Parses JSONL-formatted session transcript files
  • Extracts tool_use blocks (commands executed), text blocks (reasoning), and text_delta blocks (output)
  • Filters out credential exposure by detecting patterns like "password", "token", "key", "secret"
  • Organizes content into narrative sections with command execution details
  • Generates semantic HTML with proper heading hierarchy and code blocks
  • Uploads generated post HTML to the appropriate S3 bucket
  • Invalidates the CloudFront cache for immediate visibility
  • Updates the bucket's index.html with new post metadata

Key Technical Decisions

JSONL Parsing Strategy

Claude sessions are stored as JSONL (JSON Lines), with each line representing a discrete event. The parser handles multiple event types:

  • tool_use events capture command execution with parameters and context
  • text events contain narrative explanation of technical decisions
  • text_delta events provide tool output and results

This structure allows granular reconstruction of the development workflow with both actions taken and their outcomes.

Credential Filtering

To maintain security while enabling transparency, the generator implements pattern-based filtering that excludes text containing:

  • Literal keywords: password, token, key, secret, credential, auth
  • AWS patterns: AKIA prefixes, session tokens
  • Email addresses and potential usernames in credential contexts

This approach prevents accidental exposure while preserving technical content about infrastructure decisions.

Cross-Domain Architecture

Rather than a monolithic tech blog, each domain maintains its own blog infrastructure. This provides:

  • Isolation: Separate S3 buckets prevent