website/routes/index.go

24 lines
425 B
Go
Raw Permalink 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"
2024-08-13 21:32:48 +00:00
"git.matterlinux.xyz/Matter/website/log"
2023-12-09 16:25:38 +00:00
"github.com/gofiber/fiber/v2"
)
2024-08-13 21:32:48 +00:00
func GET_Index(c *fiber.Ctx) error {
var (
err error
con lib.Content
)
if con, err = lib.GetContent("", "index"); err != nil {
log.Error("GetContent failed: %s", err.Error())
return lib.RenderError(c, 500)
}
2023-12-09 16:25:38 +00:00
2024-08-13 21:32:48 +00:00
return c.Render("index", fiber.Map{
"readme": con,
})
2023-12-09 16:25:38 +00:00
}