website/routes/index.go

20 lines
374 B
Go

package routes
import (
"git.matterlinux.xyz/Matter/website/lib"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/log"
)
func IndexRoute(c *fiber.Ctx) error{
con, err := lib.GetContent("", "index")
if err != nil {
log.Error("GetContent -> ", err)
return lib.RenderError(c, 500)
}
return c.Render("index", fiber.Map{
"readme": con,
})
}