Building an Automated Technical Blog System for Multi-Site Documentation
What Was Done
Created a comprehensive automated technical blogging infrastructure that captures granular development work across four distinct web properties: queenofsandiego.com, sailjada.com, dangerouscentaur.com, and burialsatseasandiego.com. The system automatically generates technical blog posts at tech.[domain].com for each property, publishing detailed session-level documentation immediately after development work concludes.
Architecture Overview
The solution consists of three primary components:
- Blog Generator (
/Users/cb/Documents/repos/tools/tech_blog_generator.py) — Parses Claude Code session transcripts and converts them into granular, detailed technical blog posts - Infrastructure Initialization (
/Users/cb/Documents/repos/tools/tech_blog_init.py) — Provisions S3 buckets, CloudFront distributions, ACM certificates, and DNS records for each tech blog domain - Session Capture Hook (
/Users/cb/.claude/hooks/tech_blog_stop.sh) — Executes automatically when a Claude Code session ends, triggering blog generation and deployment
Infrastructure Setup Details
S3 and CloudFront Provisioning
For each domain, the system creates dedicated S3 buckets following the pattern tech-[domain-slug]-blog (e.g., tech-queenofsandiego-blog, tech-sailjada-blog). These buckets are configured as static website hosts with the following settings:
- Block all public access disabled for CloudFront origin access
- Versioning enabled for post history and rollback capability
- Index document set to
index.html - CloudFront Origin Access Control (OAC) for secure bucket access
CloudFront distributions are created with the following configuration:
- Origin: S3 bucket with OAC authentication
- Default root object:
index.html - Viewer protocol policy: HTTPS redirect
- Cache behaviors: 24-hour TTL for HTML, 1-year for static assets
- Compression: gzip enabled for text-based content
Certificate and DNS Strategy
The infrastructure leverages existing wildcard SSL certificates:
*.queenofsandiego.com— AWS Certificate Manager (ACM) wildcard cert coverstech.queenofsandiego.com*.sailjada.com— ACM wildcard cert coverstech.sailjada.comandtech.burialsatseasandiego.com(sailjada.com is the parent domain)*.dangerouscentaur.com— Wildcard cert via existing CloudFront distribution (E2Q4UU71SRNTMB) usingdc-sitesS3 bucket as foundation
DNS records are created based on each domain's hosting provider:
- Route53-hosted domains (queenofsandiego.com, sailjada.com): A-record aliases to CloudFront distributions
- Namecheap-hosted domain (dangerouscentaur.com): CNAME record pointing to CloudFront domain
- GoDaddy-hosted domain (burialsatseasandiego.com): CNAME record added via GoDaddy API
Blog Generator Implementation
The generator reads Claude Code session transcripts in JSONL format from ~/.claude/sessions/ and performs the following operations:
- Session Parsing — Extracts tool use entries, file modifications, and command executions from the transcript
- Content Generation — Constructs HTML blog posts with structured sections:
- What Was Done (executive summary)
- Technical Details (granular file changes and operations)
- Infrastructure Changes (exact resource names and ARNs)
- Key Decisions (architecture rationale)
- What's Next (follow-up work)
- Credential Filtering — Removes or redacts AWS credentials, API keys, passwords, and sensitive personal data before publication
- S3 Deployment — Uploads generated post HTML and updates the index with newest entries
- CloudFront Invalidation — Invalidates
/*cache pattern to ensure immediate visibility
Session Hook Integration
The stop hook (/Users/cb/.claude/hooks/tech_blog_stop.sh) is registered in Claude Code settings at ~/.claude/settings.json with the configuration:
"hooks": {
"stop": {
"script": "/Users/cb/.claude/hooks/tech_blog_stop.sh",
"log_dir": "/Users/cb/.claude/logs",
"timeout_seconds": 300
}
}
The hook executes immediately after session termination, allowing developers to receive instant feedback on what was documented. A logs directory at /Users/cb/.claude/logs/ captures execution output for debugging.
Navigation Integration
The "Ship's Papers" menu on queenofsandiego.com has been updated to include a "Development Log" link pointing to tech.queenofsandiego.com. This is implemented as a dropdown item in the main navigation structure, making technical documentation easily discoverable for stakeholders like Sergio who want visibility into granular development work.
Key Technical Decisions
- Wildcard Certificates — Using existing wildcard certs reduces provisioning time and eliminates DNS validation delays. This required careful domain hierarchy planning (burialsatseasandiego.com uses sailjada.com's wildcard).
- Multi-Provider DNS — Supporting Route53, Namecheap, and GoDaddy required conditional logic in the infrastructure script to detect each domain's nameservers and use the appropriate provisioning API.
- Granular Session Capture — Rather than high-level summaries, the system publishes all file modifications, command executions, and tool use. This enables detailed forensic analysis while filtering removes sensitive data.
- CloudFront OAC — Using Origin Access Control instead of legacy OAI provides better security and audit capabilities through IAM policies.
- Automatic Deployment Timing — The stop hook triggers immediately after session end, ensuring documentation stays in sync with actual code changes without manual intervention.
What's Next
Immediate follow-up items include:
- Testing blog generation across all four domains with production session data
- Verifying CloudFront distribution DNS propagation for all four tech blogs
- Adding HTTP access tests to confirm public visibility
- Creating index pages that aggregate recent posts by category
- Implementing search functionality across post archives
- Setting up monitoring for hook execution failures and S3 upload errors