From a97ea6a30eccbca19fe1b3d21b5830e0e01b15a4 Mon Sep 17 00:00:00 2001 From: Nicolas Paul Date: Mon, 1 May 2023 22:14:45 +0200 Subject: Make .Keywords a string of comma-separated values --- template.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3