Repository navigation
Ship no personal media; upload page heroes from the page editor - #676
Conversation
goblog's image carried the original author's photos and two videos, the default landing image was his photo, and a fresh install's Writing and About pages used his video and photo as heroes. Six old page templates (about, archives, posts, presentations, projects, tags) and their handlers were never routed; three of them hardcoded his images and about.html his biography. - The default landing image is a neutral placeholder. - Removed the photos and videos, the six templates and their handlers, and the seeded heroes. - The page editor's hero field gets an upload button: it uploads through /api/v1/upload and fills in the URL and the type, so a hero no longer has to be a file someone put on the server by hand. Closes #669. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new hero upload control hides its file input with display:none behind a non-focusable <label>, making it unreachable for keyboard-only users, unlike the codebase's existing visible file inputs.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
This PR removes the original author's personal media and dead templates/handlers from GoBlog, and adds a file-upload control for page heroes in the page editor. It closes #669 (follow-up to #657/#660), making a fresh install ship neutral, non-personal defaults and giving editors a way to set a hero by uploading a file instead of hand-typing a URL.
Changes:
- Deleted eight personal media files plus six unrouted default-theme templates (
about,archives,posts,presentations,projects,tags) and their never-registeredBloghandlers; stopped seeding personal heroes on the Writing/About pages; and swappedwww/img/profile.pngfor a neutral placeholder. - Added an "Upload a file…" control under the page editor's hero field that POSTs to
/api/v1/uploadand fills in the hero URL/type from the uploaded file. - Updated the theme-authoring doc to drop the paragraph describing the removed templates.
| File | Description |
|---|---|
blog/blog.go |
Removes the six unrouted handlers; shared helpers they used remain in use by page-type rendering. |
tools/migrate.go |
Stops seeding redtree.mp4/hero_rigolet.jpg heroes on the Writing/About default pages. |
themes/default/templates/admin_edit_page.html |
Adds the hero file-upload button, status text, and upload JS. |
themes/default/templates/{about,archives,posts,presentations,projects,tags}.html |
Deletes the unrouted templates carrying personal images/biography. |
plugins/docs/content/writing-a-theme.md |
Removes the now-obsolete paragraph about the deleted templates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The input was hidden behind a label, which keyboard users cannot reach. It is now a normal file input like the settings page's, and the upload status is announced to screen readers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Closes #669.
Problem
jason.jpg, two personal photos,hero_rigolet.jpg,aidecentralized.jpg,code.jpg) and two videos (mesh.mp4,redtree.mp4, 63 MB together)./img/profile.png, was his photo, and a fresh install's Writing and About pages usedredtree.mp4andhero_rigolet.jpgas heroes.about,archives,posts,presentations,projects,tags) and theirBloghandlers were never routed. Three hardcoded his images, andabout.htmlhis biography.Changes
www/img/profile.pngis now a neutral placeholder (a grey silhouette, 2.8 KB). The path is unchanged, so sites whose landing image setting still points at it show the placeholder instead of a 404.Posts,Tags,Speaking,Projects,About,Archives), and the heroes seeded on Writing and About. The theme guide's paragraph about those templates goes too./api/v1/upload, as the settings page and post editor do, then fills in the URL and sets the hero type from the file's type. The page is saved with the existing Save button.A site whose pages use one of the removed files as a hero loses that hero on upgrade (the URL 404s and the page shows a broken image or empty video). jasonernst.com does: About uses
/img/hero_rigolet.jpg, Research/img/aidecentralized.jpg, Writing/vid/redtree.mp4. Before deploying, upload those files to the site and point the pages at the new URLs. The files are in git history atmain.Testing
go test ./...passes; the install smoke test passes on SQLite (fresh install, pages seeded without heroes).{"filename": "/uploads/…"}) are the ones the settings page already uses.🤖 Generated with Claude Code