From 1bd733c328398d0e41d043f6e6928d61c8523cae Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 26 Jul 2025 22:43:59 -0400 Subject: [PATCH] Created a common.Page function that returns a function to render a page from a view. --- common/web.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/web.go b/common/web.go index 50c4452..9e2622e 100644 --- a/common/web.go +++ b/common/web.go @@ -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()