Skip to content

Commit

Permalink
added support for custom excerpts
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarone committed Dec 31, 2020
1 parent f497c21 commit 602c939
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ghosttohugo/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type post struct {
AuthorID json.RawMessage `json:"author_id"`
PublishedAt json.RawMessage `json:"published_at"`
CreatedAt json.RawMessage `json:"created_at"`
Summary string `json:"custom_excerpt"`

Published time.Time
Created time.Time
Expand Down Expand Up @@ -68,6 +69,9 @@ func (p post) frontMatter() map[string]interface{} {
if p.Author != "" {
metadata["author"] = p.Author
}
if p.Summary != "" {
metadata["summary"] = p.Summary
}

return metadata
}
Expand Down

0 comments on commit 602c939

Please sign in to comment.