diff --git a/blogposts/post.go b/blogposts/post.go index 5f83771..fbd8385 100644 --- a/blogposts/post.go +++ b/blogposts/post.go @@ -12,6 +12,13 @@ type Post struct { Tags []string } +// TODO: Split a metadata line into 2 parts, one is the key, another is the +// value, check if the key exists in the key map (ex. Title, Description etc.) +// If not exist, then ignore this metadata line. +// +// WARN: What if a file doesn't have metadata, just pure Markdown ?? +// We can control if we at least found title line. If at the end, it is not +// present, we consider that the post has an error. const ( titleLine = "Title: " descriptionLine = "Description: "