saasitone/routes/home.go

23 lines
403 B
Go
Raw Normal View History

2021-12-14 08:13:53 -08:00
package routes
2021-12-03 03:11:01 -08:00
import (
"goweb/controller"
2021-12-03 03:11:01 -08:00
"github.com/labstack/echo/v4"
)
type Home struct {
controller.Controller
2021-12-03 03:11:01 -08:00
}
func (h *Home) Get(c echo.Context) error {
p := controller.NewPage(c)
2021-12-03 03:11:01 -08:00
p.Layout = "main"
p.Name = "home"
p.Data = "Hello world"
2021-12-03 12:41:40 -08:00
p.Metatags.Description = "Welcome to the homepage."
p.Metatags.Keywords = []string{"Go", "MVC", "Web", "Software"}
2021-12-03 03:11:01 -08:00
return h.RenderPage(c, p)
}