A Go based DSL for building markdown
package main
import (
"io/ioutil"
. "github.com/JinWuZhao/gomdbuilder"
)
func main() {
doc := Doc(H1("Gomdbuilder"),
P("A Go based DSL for building markdown"),
H1("Example"),
P("Example: ", Ln("example.go", "example/example.go")),
P("Result:", Ln("example.md", "example/example.md")),
)
ioutil.WriteFile("example.md", []byte(doc), 0666)
}
Source: example.go
Result: example.md
go get -u github.com/JinWuZhao/gomdbuilder
BSD 3-Clause License
Copyright (c) 2018, jinwuzhao All rights reserved.