Personal blog site built with Hugo and deployed to GitHub Pages.
This is a static site built with Hugo v0.155.1 using the custom coreydaley-dev theme. The site features:
- Blog posts with categories and tags
- Client-side search powered by Pagefind
- Clean, responsive design with a fun cartoony aesthetic
- AI-generated content (clearly disclosed)
- Google Analytics integration
- Automated hero image generation via Claude + DALL-E 3
Before working on this project, ensure you have the following installed:
- Hugo Extended v0.155.1 (installation guide)
- Node.js (for Prettier and Pagefind)
- npm (comes with Node.js)
- Python 3 (for image generation scripts)
- Git (for version control)
- pre-commit (installation guide) — for git hooks
git clone https://github.com/coreydaley/coreydaley.github.io.git
cd coreydaley.github.ionpm install# Install pre-commit (choose one)
pip install pre-commit
# or
brew install pre-commit
# Install the git hook scripts
pre-commit installThis sets up a pre-commit hook that checks image sizing before every commit.
The image generation script requires a virtualenv with a few dependencies:
python3 -m venv .venv
.venv/bin/pip install anthropic openai requestsCopy .env.example to .env and fill in your API keys:
cp .env.example .envThen edit .env:
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-proj-...
The .env file is gitignored and will never be committed. These keys are used by the automated image generation script.
hugo server -DThe site will be available at http://localhost:1313. The -D flag includes draft posts.
This project uses a competitive multi-draft workflow for blog post creation, orchestrated via Claude Code.
Run this command from Claude Code to kick off the full 5-phase workflow:
- Orient — Research the topic; review AGENTS.md and recent posts for voice calibration
- Draft — Claude writes a complete draft to
content/posts/drafts/$SLUG-claude-draft.md - Compete — Codex produces an independent draft and critiques Claude's draft
- Synthesize — Both drafts are compared; merge notes written; final post produced at
content/posts/YYYY/MM/$SLUG/index.md - Image — Hero image automatically generated and inserted (see below)
Draft files are written to content/posts/drafts/ which is gitignored.
The scripts/generate-post-image.py script generates, optimizes, and inserts a hero image for any blog post in one command.
python3 scripts/generate-post-image.py content/posts/YYYY/MM/my-post/index.mdThe script automatically re-execs itself using .venv/bin/python3 — no manual activation needed.
- Reads the post and calls the Claude API to derive a concrete visual concept
- Calls DALL-E 3 (OpenAI API) to generate a 1792×1024 HD image
- Downloads the PNG to the post's bundle directory (alongside
index.md) - Runs
./scripts/optimize-images.shto convert it to WebP and generate a thumbnail - Calls Claude vision to read the actual WebP and write accurate alt text
- Inserts the
figure-floatshortcode andimagefrontmatter field intoindex.md
.envfile withANTHROPIC_API_KEYandOPENAI_API_KEYset.venv/virtualenv withanthropic openai requestsinstalled
hugo new posts/2026/03/my-post-title/index.mdPosts are leaf bundles — each post lives in its own directory alongside its images. Posts are created as drafts by default.
Always use TOML (+++ delimiters) with double quotes (single quotes cause TOML parse errors).
+++
author = "Claude Code (Claude Sonnet 4.6)"
date = "2026-02-08T14:30:00-05:00"
draft = false
title = "Post Title"
description = "SEO-friendly summary (~75 words)"
summary = "Conversational LinkedIn summary (~150 words, ends with a question or CTA)"
tags = ["lowercase-hyphenated", "specific-keywords"]
categories = ["Title Case", "Broad Topic", "Three Total"]
image = "your-image.webp"
aliases = ["/posts/your-post-slug/"]
+++Required fields:
| Field | Notes |
|---|---|
author |
Format: "Agent Name (Model Version)" |
date |
ISO 8601 with timezone offset |
draft |
false to publish |
title |
Post title |
description |
~75 words, SEO-friendly |
summary |
~150 words, conversational, ends with question or CTA |
tags |
Lowercase, hyphenated, specific |
categories |
Exactly 3, Title Case |
image |
Optional; filename only (e.g. "hero.webp") — must be in the bundle directory |
aliases |
Add ["/posts/your-slug/"] for redirect compatibility |
Posts are Hugo leaf bundles — images live inside the post's directory alongside index.md.
- Place — put your PNG/JPG in
content/posts/YYYY/MM/slug/ - Generate (automated) — run
python3 scripts/generate-post-image.py content/posts/YYYY/MM/slug/index.mdto generate, optimize, and insert a hero image automatically - Optimize (manual) — if adding your own image, run
./scripts/optimize-images.shfrom the repo root. Converts PNG/JPG to WebP and createsthumbs/. Originals are preserved locally and stripped by CI. - Alt text — read the
.webpdirectly and write ~10-word alt text describing what is literally depicted - Insert — use the filename only in the shortcode:
{{< figure-float src="example.webp" alt="your alt text" >}}
hugo server -Dhugo --minifyThe built site will be in public/.
# Format Hugo templates
npx prettier --write "themes/coreydaley-dev/layouts/**/*.html"
# Check formatting
npx prettier --check "themes/coreydaley-dev/layouts/**/*.html".
├── .claude/
│ └── commands/
│ └── create-blog-post.md # /create-blog-post Claude Code command
├── .env # API keys (gitignored — copy from .env.example)
├── .env.example # API key template
├── .github/
│ └── workflows/
│ └── hugo.yml # GitHub Actions CI/CD
├── .pre-commit-config.yaml # Pre-commit hooks configuration
├── .prettierrc # Prettier configuration
├── .venv/ # Python virtualenv (gitignored)
├── AGENTS.md # Instructions for AI agents
├── CLAUDE.md # Claude-specific instructions
├── Makefile # Build automation tasks
├── archetypes/
│ └── default.md # Template for new posts
├── content/
│ ├── posts/
│ │ ├── YYYY/MM/slug/ # Leaf bundle: index.md + images + thumbs/
│ │ └── drafts/ # In-progress drafts (gitignored)
│ └── search.md # Search page
├── hugo.toml # Hugo configuration
├── package.json # npm dependencies
├── public/ # Built site (gitignored)
├── scripts/
│ ├── generate-post-image.py # Automated hero image generation
│ ├── optimize-images.sh # PNG/JPG → WebP conversion
│ └── recompress-images.sh # Recompress existing WebPs
├── static/ # Global static assets (favicon, theme images)
│ └── images/ # Non-post images only
└── themes/
└── coreydaley-dev/ # Custom Hugo theme
├── layouts/ # Hugo templates
└── static/ # CSS, JS, theme images
Main site settings including base URL, title, author info, social links, Google Analytics, pagination, and taxonomy configuration.
Configured for Hugo templates via prettier-plugin-go-template. Handles Go template syntax, consistent indentation, and line wrapping.
- UTF-8 encoding, LF line endings
- 2-space indentation for HTML, JS, YAML, TOML
- 4-space indentation for CSS
- Trim trailing whitespace
The site deploys automatically to GitHub Pages via GitHub Actions on every push to main.
- Push changes to
main - GitHub Actions triggers (
.github/workflows/hugo.yml) - Workflow installs Hugo v0.155.1 extended, Dart Sass, Node.js, and Pagefind
- Builds with
hugo --minify - Indexes content with
npx pagefind --site "public" - Deploys to GitHub Pages
- Site is live at
https://coreydaley.github.io
This project welcomes AI-assisted development. When working as an AI agent:
- Read AGENTS.md first — contains complete conventions for frontmatter, images, categories, voice, and file headers
- Set proper author attribution — format:
"Agent Name (Model Version)" - Add file comment headers — include Created/Modified metadata in HTML, CSS, JS, TOML files; never in Markdown
- Use double quotes in TOML — single quotes cause parse errors
- Exactly 3 categories per post — Title Case, broader than tags
- Run
hugo --minifyto verify changes don't break the build
See AGENTS.md for complete instructions.
hugo version
# Should report v0.155.1+extended# Verify venv and dependencies
.venv/bin/python3 -c "import anthropic, openai, requests; print('OK')"
# Verify API keys are set in .env
cat .envnpm install
npm list prettier-plugin-go-templatePagefind indexes are built during CI. To test search locally:
hugo --minify
npx pagefind --source "public"
hugo server --disableFastRenderHard refresh: Cmd+Shift+R (Mac) / Ctrl+Shift+R (Windows/Linux)
The code in this repository (themes, templates, scripts, configuration files) is open source under the MIT License.
Blog content (posts, images in /content/ and /static/images/) is licensed under CC BY-NC-ND 4.0.
- Built with Hugo
- Search powered by Pagefind
- Hosted on GitHub Pages
- Formatted with Prettier
- Git hooks managed by pre-commit
- AI-assisted development with Claude Code
- Hero images generated with DALL-E 3 via the OpenAI API
Note: Content on this site (text and images) may be AI-generated and is clearly disclosed as such.
