mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 03:01:03 +01:00
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
|
||
|
}
|