website/routes/index.go

24 lines
425 B
Go

package routes
import (
"git.matterlinux.xyz/Matter/website/lib"
"git.matterlinux.xyz/Matter/website/log"
"github.com/gofiber/fiber/v2"
)
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)
}
return c.Render("index", fiber.Map{
"readme": con,
})
}