GLAMOUR_STYLE environment variable support (#69)

This commit is contained in:
Jesse Millar
2020-05-27 17:07:25 +02:00
committed by GitHub
parent e859bb067c
commit d3564681b9
4 changed files with 35 additions and 0 deletions
+5
View File
@@ -55,6 +55,11 @@ fmt.Print(out)
You can find all available default styles in our [gallery](https://github.com/charmbracelet/glamour/tree/master/styles/gallery).
Want to create your own style? [Learn how!](https://github.com/charmbracelet/glamour/tree/master/styles)
There are a few options for using a custom style:
1. Call `glamour.Render(inputText, "desiredStyle")`
1. Set the `GLAMOUR_STYLE` environment variable to your desired default style or a file location for a style and call `glamour.RenderWithEnvironmentConfig(inputText)`
1. Set the `GLAMOUR_STYLE` environment variable and pass `glamour.WithEnvironmentConfig()` to your custom renderer
## Glamourous Projects