Have got post creation working.

This commit is contained in:
Leon Mika 2025-01-27 14:23:54 +11:00
parent 63b19a249a
commit 8e0ffb6c24
20 changed files with 479 additions and 11 deletions

20
models/posts.go Normal file
View file

@ -0,0 +1,20 @@
package models
import "time"
type PostState string
const (
PostStateDraft PostState = "draft"
PostStatePublished PostState = "published"
)
type Post struct {
ID int64
SiteID int64
Title string
Body string
State PostState
PostDate time.Time
CreatedAt time.Time
}

View file

@ -3,4 +3,10 @@ package models
type ThemeMeta struct {
Name string `json:"name"`
URL string `json:"repo"`
// Indicates that this theme prefers posts have titles.
PreferTitle bool
// Content directory for "blog" posts
PostDir string `json:"post_dir"`
}