summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Paul <n@nc0.fr>2023-05-01 22:14:45 +0200
committerNicolas Paul <n@nc0.fr>2023-05-01 22:14:45 +0200
commita97ea6a30eccbca19fe1b3d21b5830e0e01b15a4 (patch)
treee799689b24fa3c4172d3f8dbd809edebe7d34579
parentf57c0d15c931563a55abdc9cea72d189a24f7456 (diff)
Make .Keywords a string of comma-separated values
-rw-r--r--template.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/template.go b/template.go
index 8545e1e..cd3aac0 100644
--- a/template.go
+++ b/template.go
@@ -7,6 +7,7 @@ package main
import (
"bytes"
"fmt"
+ "strings"
"time"
)
@@ -33,7 +34,7 @@ func GenerateHTML(fm FrontMatter, slug, content string) ([]byte, error) {
Description: fm.Description,
PublicationTime: fm.PublicationTime.Format(time.RFC3339),
LastUpdateTime: fm.LastUpdateTime.Format(time.RFC3339),
- Keywords: fmt.Sprintf("%s", fm.Keywords),
+ Keywords: strings.Join(fm.Keywords, ","),
Author: fm.Author,
Content: content,
Site: *url,