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: about 1 month 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-23T09:40:10.000Z (about 7 years ago)
- Last Synced: 2024-02-14T19:32:47.135Z (10 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
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