owl-blogs/renderer.go

17 lines
226 B
Go
Raw Normal View History

2022-07-21 17:02:37 +00:00
package kiss
import (
"bytes"
"github.com/yuin/goldmark"
)
func RenderPost(post Post) string {
var buf bytes.Buffer
if err := goldmark.Convert(post.Content(), &buf); err != nil {
panic(err)
}
return buf.String()
}