iris/adaptors/view/pug.go
Gerasimos (Makis) Maropoulos 244a59e055 20 days of unstoppable work. Waiting fo go 1.8, I didn't finish yet, some touches remains.
Former-commit-id: ed84f99c89f43fe5e980a8e6d0ee22c186f0e1b9
2017-02-14 05:54:11 +02:00

22 lines
688 B
Go

package view
import (
"github.com/Joker/jade"
)
// Pug (or Jade) returns a new kataras/go-template/pug engine.
// It shares the same exactly logic with the
// HTMLAdaptor, it uses the same exactly configuration.
// It has got some features and a lot of functions
// which will make your life easier.
// Read more about the Jade Go Template: https://github.com/Joker/jade
func Pug(directory string, extension string) *HTMLAdaptor {
h := HTML(directory, extension)
// because I has designed the kataras/go-template
// so powerful, we can just pass a parser middleware
// into the standard html template engine
// and we're ready to go.
h.engine.Middleware = jade.Parse
return h
}