Commit graph

65 commits

Author SHA1 Message Date
Leon Mika f17597e4b8 feat(pages): add pages table schema and sqlc queries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 17:57:49 +11:00
Leon Mika 620ab6c6fa docs: add pages feature implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 17:47:19 +11:00
Leon Mika a00567a756 Add arbitrary pages feature design spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 16:37:47 +11:00
lmika 3d8c6f5345 Merge pull request 'Paging' (#4) from feature/pages-and-paging into main
Reviewed-on: #4
2026-03-22 05:23:53 +00:00
Leon Mika 0a1631a7e0 Fixed paging URL 2026-03-22 16:22:32 +11:00
Leon Mika 40da63368a fix: add nil guard for StaticFS and set default PostsPerPage in FirstRun
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:41:50 +11:00
Leon Mika f68bac809f feat: add pagination to generated site category pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:38:39 +11:00
Leon Mika 30884372d6 feat: add pagination to generated site post list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:37:42 +11:00
Leon Mika 550ebf728a feat: add posts per page setting to site settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 14:35:56 +11:00
Leon Mika d7a5d425b8 feat: add pagination controls to admin post list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:34:55 +11:00
Leon Mika 82feccf64a feat: add pagination to admin post list handler and service
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:33:31 +11:00
Leon Mika 113789a972 feat: add PageInfo model for pagination
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:32:02 +11:00
Leon Mika 5bf77ede5c feat: add CountPostsOfSite query and DB method
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 14:31:36 +11:00
Leon Mika 9919f3444a feat: add PostsPerPage to Site model and DB provider
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 14:28:50 +11:00
Leon Mika 9b36a35c1a feat: add posts_per_page column to sites table
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 14:26:09 +11:00
Leon Mika 7c4dc0885e Add paging implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 13:12:28 +11:00
Leon Mika 4d96ec8b95 Add paging feature design spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 12:46:43 +11:00
lmika fa676cfdf7 Merge pull request 'Add categories feature' (#3) from feature/categories into main
Reviewed-on: #3
2026-03-21 23:29:04 +00:00
Leon Mika d9aec4af2c Styled the categories on the site 2026-03-22 10:28:33 +11:00
Leon Mika f45bdcd83c Styled the admin section of categories. 2026-03-21 12:01:24 +11:00
Leon Mika 740cf8979a fix: unit tests 2026-03-18 22:19:26 +11:00
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