19 lines
321 B
Go
19 lines
321 B
Go
package routes
|
|
|
|
import (
|
|
"github.com/gofiber/fiber/v2"
|
|
"github.com/gofiber/fiber/v2/log"
|
|
)
|
|
|
|
func IndexRoute(c *fiber.Ctx) error{
|
|
content, err := GetContent("content", "index")
|
|
if err != nil {
|
|
log.Error(err)
|
|
return RenderError(c, 500)
|
|
}
|
|
|
|
return c.Render("index", fiber.Map{
|
|
"readme": content,
|
|
})
|
|
}
|