2023-12-09 16:25:38 +00:00
|
|
|
package routes
|
|
|
|
|
|
|
|
import (
|
2024-01-06 20:20:58 +00:00
|
|
|
"git.matterlinux.xyz/Matterlinux/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{
|
2024-01-06 20:20:58 +00:00
|
|
|
con, err := lib.GetContent("", "index")
|
2023-12-09 16:25:38 +00:00
|
|
|
if err != nil {
|
2024-01-06 20:20:58 +00:00
|
|
|
log.Error("GetContent -> ", err)
|
|
|
|
return lib.RenderError(c, 500)
|
2023-12-09 16:25:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return c.Render("index", fiber.Map{
|
2024-01-06 20:20:58 +00:00
|
|
|
"readme": con,
|
2023-12-09 16:25:38 +00:00
|
|
|
})
|
|
|
|
}
|