Created a common.Page function that returns a function to render a page from a view.
This commit is contained in:
parent
ec7298cce0
commit
1bd733c328
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,12 @@ import (
|
|||
"github.com/gofiber/template/html/v2"
|
||||
)
|
||||
|
||||
func Page(path string) (func(c *fiber.Ctx) error) {
|
||||
return func (c *fiber.Ctx) error {
|
||||
return c.Render("stream", fiber.Map{})
|
||||
}
|
||||
}
|
||||
|
||||
func RenderPages(pages_path string, target string, layout string) {
|
||||
engine := html.New(pages_path, ".html")
|
||||
engine.Load()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue