v1 blog API routes

This commit is contained in:
ari melody 2025-11-07 19:31:34 +00:00
parent fec3325503
commit eaa2f6587d
Signed by: ari
GPG key ID: CF99829C92678188
9 changed files with 286 additions and 34 deletions

View file

@ -66,7 +66,7 @@ func serveBlogIndex(app *model.AppState) http.Handler {
if post.CreatedAt.Year() != collectionYear || i == len(posts) - 1 {
if i == len(posts) - 1 {
collectionPosts = append(collectionPosts, &authoredPost)
collectionPosts = append([]*blogPost{&authoredPost}, collectionPosts...)
}
collections = append(collections, &blogPostGroup{
Year: collectionYear,