Categorygithub.com/flowerwrong/plushgin
modulepackage
0.0.0-20171223094000-bad75070f0c8
Repository: https://github.com/flowerwrong/plushgin.git
Documentation: pkg.go.dev

# README

Plush template for gin

Package plushgin is a plush template renderer that can be used with the Gin web framework. It uses the plush template library.

Basic Usage

router.HTMLRender = plushgin.Default()
// or
router.HTMLRender = plushgin.New(plushgin.RenderOptions{
	TemplateDir: 		"templates",
	ContentType: 		"text/html; charset=utf-8",
	MaxCacheEnties: 128,
})

router.GET("/", func(c *gin.Context) {
	c.HTML(200, "index.html", gin.H{"name": "world"})
})

TODO

  • layout

# Functions

Default creates a Plush2Render instance with default options.
New creates a new Plush2Render instance with custom Options.
NewContext create a plush.Context.

# Structs

Plush2Render is a custom Gin template renderer using plush.
RenderOptions is used to configure the renderer.