mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
244a59e055
Former-commit-id: ed84f99c89f43fe5e980a8e6d0ee22c186f0e1b9
22 lines
688 B
Go
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
|
|
}
|