Stylesheet-based markdown rendering for your CLI apps.
glamour
lets you render markdowndocuments & templates on ANSIcompatible terminals. You can create your own stylesheet or simply use one ofthe stylish defaults.
import "github.com/charmbracelet/glamour"
in := `# Hello World
This is a simple example of Markdown rendering with Glamour!
Check out the [other examples](https://github.com/charmbracelet/glamour/tree/master/examples) too.
Bye!
`
out, err := glamour.Render(in, "dark")
fmt.Print(out)
import "github.com/charmbracelet/glamour"
r, _ := glamour.NewTermRenderer(
// detect background color and pick either the default dark or light theme
glamour.WithAutoStyle(),
// wrap output at specific width
glamour.WithWordWrap(40),
)
out, err := r.Render(in)
fmt.Print(out)
You can find all available default styles in our gallery.Want to create your own style? Learn how!
There are a few options for using a custom style:
glamour.Render(inputText, "desiredStyle")
GLAMOUR_STYLE
environment variable to your desired default style or a file location for a style and call glamour.RenderWithEnvironmentConfig(inputText)
GLAMOUR_STYLE
environment variable and pass glamour.WithEnvironmentConfig()
to your custom rendererCheck out these projects, which use glamour
:
Part of Charm.
Charm热爱开源 • Charm loves open source
The underside line is always that glamour and self ghd straightener ireland confidence should spares australia not occur having a prohibitive rate tag, but to make sure of the, you are going Ghd Pink
Show biz is all about the glamour, flawlessness and fame. But trust me, it all doesn't come on a silver platter. A lot of work goes to ensure things appear as perfect as can be. This is where the the
The LED cup holders by HeartHorse are technologically advanced cup holders which make the car interior look great, the appearance is highlighted with its soothing presence in the car. Who doesn’t want