Also set title via content

kcoram/uplift
Jan-Lukas Else 2019-11-09 00:40:55 +01:00
parent 93433de827
commit 6b41fcfb09
1 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,9 @@ func computeExtraSettings(entry *Entry) error {
if strings.HasPrefix(text, "section: ") { if strings.HasPrefix(text, "section: ") {
// Section // Section
entry.section = strings.TrimPrefix(text, "section: ") entry.section = strings.TrimPrefix(text, "section: ")
} else if strings.HasPrefix(text, "title: ") {
// Title
entry.title = strings.TrimPrefix(text, "title: ")
} else if strings.HasPrefix(text, "slug: ") { } else if strings.HasPrefix(text, "slug: ") {
// Slug // Slug
entry.slug = strings.TrimPrefix(text, "slug: ") entry.slug = strings.TrimPrefix(text, "slug: ")