Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/FlowerWrong/plushgin
- Owner: FlowerWrong
- Created: 2017-12-23T08:53:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-23T09:40:10.000Z (almost 7 years ago)
- Last Synced: 2024-02-14T19:32:47.135Z (9 months ago)
- Topics: gin, plush
- Language: Go
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-gin - FlowerWrong/plushgin
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