cmd/sgblog/main.go | 30 +++++++++++++++++++----------- diff --git a/cmd/sgblog/main.go b/cmd/sgblog/main.go index bd31b3c857e07ac22d1c8158baf6775425a2cae3095a805e61671c861988564c..35fefcdc5549d57282e379293ad30a6ede4ae51a2a5e7480e1baac20899c2fc9 100644 --- a/cmd/sgblog/main.go +++ b/cmd/sgblog/main.go @@ -49,8 +49,8 @@ AtomFeed = "feed.atom" ) var ( - Version = "0.0.1" - ETagVersion = []byte("1") + Version = "0.0.2" + ETagVersion = []byte("2") sha1DigestRe = regexp.MustCompilePOSIX("([0-9a-f]{40,40})") defaultLinks = []string{} repo *git.Repository @@ -445,15 +445,23 @@ lines := msgSplit(commit.Message) title := lines[0] when := commit.Author.When.Format(WhenFmt) os.Stdout.Write([]byte(startHeader(etagHash, gzipWriter != nil))) - parent := commit.ParentHashes[0].String() - out.Write([]byte(startHTML(fmt.Sprintf("%s (%s)", title, when), []string{ - fmt.Sprintf(``, "/"+parent), - }))) - out.Write([]byte(fmt.Sprintf( - "[%s] [%s]\n
\n", title)))
for _, line := range lines[2:] {
line = strings.ReplaceAll(line, "&", "&")