website/routes/index.go

20 lines
374 B
Go
Raw Normal View History

2023-12-09 16:25:38 +00:00
package routes
import (
2024-01-18 17:01:30 +00:00
"git.matterlinux.xyz/Matter/website/lib"
2023-12-09 16:25:38 +00:00
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/log"
)
func IndexRoute(c *fiber.Ctx) error{
con, err := lib.GetContent("", "index")
2023-12-09 16:25:38 +00:00
if err != nil {
log.Error("GetContent -> ", err)
return lib.RenderError(c, 500)
2023-12-09 16:25:38 +00:00
}
return c.Render("index", fiber.Map{
"readme": con,
2023-12-09 16:25:38 +00:00
})
}