Add Markdown HTML publication
This commit is contained in:
11
internal/transform/markdown/template.go
Normal file
11
internal/transform/markdown/template.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package markdown
|
||||
|
||||
import "bytes"
|
||||
|
||||
func wrapHTML(body []byte) []byte {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title></title>\n</head>\n<body>\n")
|
||||
buf.Write(body)
|
||||
buf.WriteString("</body>\n</html>\n")
|
||||
return buf.Bytes()
|
||||
}
|
||||
Reference in New Issue
Block a user