Go to file
2023-11-01 00:23:27 -07:00
go.mod Initial Commit 2023-10-31 21:43:21 -07:00
go.sum Initial Commit 2023-10-31 21:43:21 -07:00
LICENSE Initial Commit 2023-10-31 21:43:21 -07:00
README.md Add code example to README 2023-11-01 00:23:27 -07:00
salixmd.go Initial Commit 2023-10-31 21:43:21 -07:00

salixmd

Salix tag for markdown rendering.

Template Example:

<div>
    #markdown:
        # Example!
        [example](https://example.com)
    #!markdown
</div>

Code Example:

md := goldmark.New(goldmark.WithExtensions(extension.GFM))

tmpl, err := salix.New().ParseFile("example.txt")
if err != nil {
	panic(err)
}

err = tmpl.
	WithTagMap(map[string]salix.Tag{
		"markdown": salixmd.New(md),
	}).
	Execute(os.Stdout)
if err != nil {
	panic(err)
}