diff --git a/README.md b/README.md index 2a25d01..7a7355e 100644 --- a/README.md +++ b/README.md @@ -90,3 +90,8 @@ Types of blogo tags: [blogo-content] [blogo-index-post-template] ``` + + +--- + +Blogo is used in https://arnaucode.com/blog diff --git a/blogo b/blogo index cc9cd80..1d4d390 100755 Binary files a/blogo and b/blogo differ diff --git a/main.go b/main.go index 814c3b7..f853c61 100644 --- a/main.go +++ b/main.go @@ -43,8 +43,11 @@ func main() { mdcontent := readFile(directory + "/" + post.Md) htmlcontent := string(blackfriday.Run([]byte(mdcontent))) + firstline := strings.Split(mdcontent, "\n")[0] + title := strings.Replace(firstline, "# ", "", -1) + m := make(map[string]string) - m["[blogo-title]"] = config.Title + m["[blogo-title]"] = title + " - " + config.Title m["[blogo-content]"] = htmlcontent r := putHTMLToTemplate(indexTemplate, m)