Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/FlowerWrong/plushgin

plush template for gin web framework
https://github.com/FlowerWrong/plushgin

gin plush

Last synced: 3 months ago
JSON representation

plush template for gin web framework

Awesome Lists containing this project

README

        

# Plush template for gin

Package plushgin is a plush template renderer that can be used with the [Gin web framework](https://github.com/gin-gonic/gin).
It uses the [plush template library](https://github.com/gobuffalo/plush).

## Basic Usage

```golang
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