1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-24 04:15:56 +00:00

20 days of unstoppable work. Waiting fo go 1.8, I didn't finish yet, some touches remains.

Former-commit-id: ed84f99c89f43fe5e980a8e6d0ee22c186f0e1b9
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-02-14 05:54:11 +02:00
parent 2b2a205e63
commit 244a59e055
108 changed files with 9016 additions and 7596 deletions

21
adaptors/view/pug.go Normal file
View File

@@ -0,0 +1,21 @@
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
}