website/routes/index.go

21 lines
363 B
Go
Raw Normal View History

2023-12-09 16:25:38 +00:00
package routes
import (
2024-03-19 20:16:26 +00:00
"log"
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"
)
func IndexRoute(c *fiber.Ctx) error{
con, err := lib.GetContent("", "index")
2023-12-09 16:25:38 +00:00
if err != nil {
2024-03-19 20:16:26 +00:00
log.Printf("GetContent failed: %s", err.Error())
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
})
}