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>
This commit is contained in:
parent
4c2ce7272d
commit
6c69131b03
10 changed files with 329 additions and 61 deletions
|
|
@ -11,11 +11,11 @@ import (
|
|||
type Site struct {
|
||||
models.Site
|
||||
BaseURL string
|
||||
//Posts []*models.Post
|
||||
Uploads []models.Upload
|
||||
|
||||
OpenUpload func(u models.Upload) (io.ReadCloser, error)
|
||||
|
||||
// PostItr returns a new post iterator
|
||||
PostIter func(ctx context.Context) iter.Seq[models.Maybe[*models.Post]]
|
||||
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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue