Skip to content

Commit

Permalink
fix #1450 and continue on implementing 1449
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Feb 14, 2020
1 parent aa65ebf commit 387c90b
Show file tree
Hide file tree
Showing 24 changed files with 578 additions and 141 deletions.
25 changes: 17 additions & 8 deletions _examples/view/embedding-templates-into-app/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions _examples/view/template_jet_1_embedded/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (
"github.com/kataras/iris/v12"
)

// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./views/...
// $ go build
func main() {
app := iris.New()
tmpl := iris.Jet("./views", ".jet").Binary(Asset, AssetNames)
Expand Down
4 changes: 2 additions & 2 deletions _examples/view/template_pug_2/templates/index.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
doctype html
html
include templates/header.pug
include header.pug
body
h1 My Site
p {{ bold "Welcome to my super lame site."}}
include templates/footer.pug
include footer.pug
269 changes: 269 additions & 0 deletions _examples/view/template_pug_3/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion _examples/view/template_pug_3/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ package main

import "github.com/kataras/iris/v12"

// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./templates/...
// $ go build
func main() {
app := iris.New()

tmpl := iris.Pug("./templates", ".pug")
tmpl := iris.Pug("./templates", ".pug").Binary(Asset, AssetNames)

app.RegisterView(tmpl)

Expand Down
2 changes: 1 addition & 1 deletion _examples/view/template_pug_3/templates/index.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends templates/layout.pug
extends layout.pug

block title
title Article Title
Expand Down
Loading

0 comments on commit 387c90b

Please sign in to comment.