Use consts for route names and templates.
This commit is contained in:
parent
5af18e2473
commit
c2b6928fb4
30 changed files with 135 additions and 82 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/mikestefanello/pagoda/pkg/controller"
|
||||
"github.com/mikestefanello/pagoda/templates"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
|
@ -21,8 +22,8 @@ type (
|
|||
|
||||
func (c *home) Get(ctx echo.Context) error {
|
||||
page := controller.NewPage(ctx)
|
||||
page.Layout = "main"
|
||||
page.Name = "home"
|
||||
page.Layout = templates.LayoutMain
|
||||
page.Name = templates.PageHome
|
||||
page.Metatags.Description = "Welcome to the homepage."
|
||||
page.Metatags.Keywords = []string{"Go", "MVC", "Web", "Software"}
|
||||
page.Pager = controller.NewPager(ctx, 4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue