diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/item.go | 5 | ||||
-rw-r--r-- | content/post.go | 15 |
2 files changed, 3 insertions, 17 deletions
diff --git a/content/item.go b/content/item.go index 08d6359..e96a34e 100644 --- a/content/item.go +++ b/content/item.go @@ -2,6 +2,7 @@ package content // Item should only be embedded into content type structs. type Item struct { - ID int `json:"id"` - Slug string `json:"slug"` + ID int `json:"id"` + Slug string `json:"slug"` + Timestamp string `json:"timestamp"` } diff --git a/content/post.go b/content/post.go index 5b98253..14f3330 100644 --- a/content/post.go +++ b/content/post.go @@ -16,7 +16,6 @@ type Post struct { Author string `json:"author"` Category []string `json:"category"` ThemeStyle string `json:"theme"` - Timestamp string `json:"timestamp"` } func init() { @@ -42,14 +41,6 @@ func (p *Post) Editor() *editor.Editor { return &p.editor } func (p *Post) MarshalEditor() ([]byte, error) { view, err := editor.Form(p, editor.Field{ - View: editor.Input("Slug", p, map[string]string{ - "label": "URL Path", - "type": "text", - "disabled": "true", - "placeholder": "Will be set automatically", - }), - }, - editor.Field{ View: editor.Input("Title", p, map[string]string{ "label": "Post Title", "type": "text", @@ -86,12 +77,6 @@ func (p *Post) MarshalEditor() ([]byte, error) { "light": "Light", }), }, - editor.Field{ - View: editor.Input("Timestamp", p, map[string]string{ - "label": "Publish Date", - "type": "date", - }), - }, ) if err != nil { |