Christian Rocha e859bb067c Use margins at the document level (versus indent) in default styles (#67)
* Use margins at the document level (versus indent) in default styles

* Fix tests per the style changes in the previous commit
2020-05-21 17:03:59 +02:00
2020-03-04 17:41:00 +01:00
2020-02-28 07:17:43 +01:00
2019-12-28 02:55:20 +01:00
2019-12-19 00:43:46 +01:00
2019-12-20 22:55:00 +01:00
2019-12-20 22:55:00 +01:00
2020-05-14 05:41:11 +02:00
2020-05-14 05:41:11 +02:00
2019-11-15 12:27:41 -06:00
2020-05-14 05:40:07 +02:00

Glamour

Latest Release GoDoc Build Status Coverage Status Go ReportCard

Write handsome command-line tools with glamour!

glamour lets you render markdown documents & templates on ANSI compatible terminals. You can create your own stylesheet or use one of our glamourous default themes.

Usage

import "github.com/charmbracelet/glamour"

in := `# Hello World

This is a simple example of glamour!
Check out the [other examples](https://github.com/charmbracelet/glamour/tree/master/examples).

Bye!
`

out, err := glamour.Render(in, "dark")
fmt.Print(out)

HelloWorld Example

Custom Renderer

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)

Styles

You can find all available default styles in our gallery. Want to create your own style? Learn how!

Glamourous Projects

Check out Glow, a markdown renderer for the command-line, which uses glamour.

License

MIT

S
Description
A temporary, hacked together fork of Glamour v0.7.0 to reduce the startup time and binary size of MUTN while other solutions are evaluated.
Readme MIT
2.6 MiB
Languages
Go 98.5%
Shell 1.5%