Have got post creation working.
This commit is contained in:
parent
63b19a249a
commit
8e0ffb6c24
20 changed files with 479 additions and 11 deletions
20
models/posts.go
Normal file
20
models/posts.go
Normal 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
|
||||
}
|
||||
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue