Commit graph

44 commits

Author SHA1 Message Date
Leon Mika 9efa40879f fix: improve error handling in categories service
- Slug collision checks now properly propagate real DB errors instead of
  silently ignoring them
- GetCategory now verifies site ownership, matching the pattern used by
  UpdateCategory and DeleteCategory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 22:11:33 +11:00
Leon Mika 6c69131b03 feat: add category pages and per-category feeds to site builder
Extend the publishing pipeline to generate category index pages,
per-category archive pages, per-category RSS/JSON feeds, and display
categories on individual post pages and post lists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:51:19 +11:00
Leon Mika 4c2ce7272d feat: add category selection to post edit form and badges to post list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 21:45:28 +11:00
Leon Mika ffa86b12e9 feat: add categories admin UI with CRUD
Wire up categories service, add CategoriesHandler with full CRUD, create index/edit templates, register routes in server.go, and add Categories nav link.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 21:42:17 +11:00
Leon Mika 3c80f63a55 feat: add categories service with CRUD and slug validation 2026-03-18 21:38:41 +11:00
Leon Mika 15bc6b7f73 feat: add DB provider methods for categories
Implements SaveCategory, SelectCategory, SelectCategoriesOfSite,
SelectCategoryBySlugAndSite, DeleteCategory, SelectCategoriesOfPost,
SelectPostsOfCategory, CountPostsOfCategory, and SetPostCategories on
the DB Provider, along with BeginTx/QueriesWithTx for transaction
support. Also fixes pre-existing compilation errors in provider_test.go
(missing PagingParams args) so new tests can compile and run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:37:01 +11:00
Leon Mika d47095a902 feat: add sqlc queries for categories 2026-03-18 21:33:55 +11:00
Leon Mika 641b402d4a feat: add categories migration and model
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 21:32:24 +11:00
Leon Mika 41c8d1e2f5 Add categories implementation plan
9-task plan covering migration, sqlc queries, DB provider,
service layer, admin UI, post form integration, site builder
with category pages and per-category feeds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:29:11 +11:00
Leon Mika 9a02a2f8af Address spec review feedback for categories design
Adds updated_at field, transaction requirement, slug collision
handling, authorization checks, explicit query filters, pubmodel
signatures, and template registration notes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:14:24 +11:00
Leon Mika 847e8e76d0 Add categories feature design spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:11:18 +11:00
Leon Mika 0bd91de234 Added a site setting section 2026-03-09 21:47:02 +11:00
Leon Mika 499c0d8568 Set image URLs to absolute paths 2026-03-09 09:32:32 +11:00
Leon Mika 7c08e1fbe0 Fixed bug which was exposing draft posts 2026-03-08 09:54:46 +11:00
Leon Mika fa9be69045 Added feeds for crossposting and a rebuild site button 2026-03-08 09:37:49 +11:00
Leon Mika 76ed54f119 Added fallback if renaming cant move an upload 2026-03-05 22:48:38 +11:00
Leon Mika 891d904d9c Added error logging 2026-03-05 22:37:11 +11:00
Leon Mika 1b24386001 Added the scratch dir config 2026-03-05 22:27:14 +11:00
lmika 55b388d497 Merge pull request 'Added RSS and JSON feeds' (#2) from feature/rss into main
Reviewed-on: #2
2026-03-05 11:05:01 +00:00
Leon Mika 21f181f83d Added RSS and JSON feeds 2026-03-05 22:04:24 +11:00
lmika 65e5ce2733 Merge pull request 'Uploads' (#1) from feature/uploads into main
Reviewed-on: #1
2026-03-05 10:03:46 +00:00
Leon Mika 53d9b62174 Some minor fixes 2026-03-05 20:53:26 +11:00
Leon Mika 199ff9feb9 More changes to uploads:
- Have got upload images appearing in the post list
- Allowed for deleting uploads
- Allowed for seeing the upload progress
- Fixed the setting of upload properties like the MIME type
- Removed the stripe exif logic with just re-encoding PNGs and JPEGs by loading them and saving them
2026-03-04 22:33:39 +11:00
Leon Mika d0cebe6564 Added publishing of uploads to built site 2026-03-03 22:36:24 +11:00
Leon Mika 48f39133d7 Started working on the view upload page 2026-03-02 22:26:40 +11:00
Leon Mika 0a9af9cde8 Started a repository of the uploads 2026-03-02 21:10:09 +11:00
Leon Mika 6b697e008f Have got uploads working 2026-03-02 20:48:41 +11:00
Leon Mika 97112d99dd Added docker file 2026-02-28 11:02:15 +11:00
Leon Mika 4a6b79db17 Added sub commands for doing admin stuff 2026-02-28 10:39:08 +11:00
Leon Mika 329de2f953 Added a suite GUID 2026-02-28 09:49:43 +11:00
Leon Mika 30d99eeb9e Have got first run working and publishing to Netlify 2026-02-26 22:23:47 +11:00
Leon Mika b7e0269e9d Have got logout working 2026-02-25 22:30:28 +11:00
Leon Mika 01c6e9de87 First pass of authentication 2026-02-25 22:04:47 +11:00
Leon Mika c943864edc Auto-focus the post text box on new post 2026-02-24 22:26:25 +11:00
Leon Mika 44d35c6ccb Added keyboard shortcuts for post editing. 2026-02-24 22:21:26 +11:00
Leon Mika 4f7058bf36 Have got asynchronous publishing working 2026-02-23 21:35:12 +11:00
Leon Mika 3ea5823ca0 Have got soft and hard deleting 2026-02-23 21:18:34 +11:00
Leon Mika aef3bb6a1e Styled the post list and added updating of posts 2026-02-22 10:09:34 +11:00
Leon Mika e77cac2fd5 Started working on the frontend
- Added the new post frontend
- Hooked up publishing of posts to the site publisher
- Added an site exporter as a publishing target
2026-02-21 10:22:10 +11:00
Leon Mika a59008b3e8 Added direct publishing to Netlify 2026-02-20 17:39:58 +11:00
Leon Mika 8136655336 Added a database 2026-02-19 22:29:44 +11:00
Leon Mika ebaec3d296 Modified models to support a DB 2026-02-19 21:21:27 +11:00
Leon Mika 3591e0c723 Fixed some bugs for publishing a first site 2026-02-18 22:38:05 +11:00
Leon Mika 77d3ff4852 Initial commit 2026-02-18 22:07:18 +11:00