blogposts: add some comments

This commit is contained in:
vinchent 2024-09-24 22:18:01 +02:00
parent 3cdca7cc94
commit 3923758807

View File

@ -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: "