weiro/models/pubmodel/sites.go
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

22 lines
548 B
Go

package pubmodel
import (
"context"
"io"
"iter"
"lmika.dev/lmika/weiro/models"
)
type Site struct {
models.Site
BaseURL string
Uploads []models.Upload
OpenUpload func(u models.Upload) (io.ReadCloser, error)
PostIter func(ctx context.Context) iter.Seq[models.Maybe[*models.Post]]
Categories []models.CategoryWithCount
PostIterByCategory func(ctx context.Context, categoryID int64) iter.Seq[models.Maybe[*models.Post]]
CategoriesOfPost func(ctx context.Context, postID int64) ([]*models.Category, error)
}