Use consts for route names and templates.

This commit is contained in:
mikestefanello 2023-12-16 11:07:20 -05:00
parent 5af18e2473
commit c2b6928fb4
30 changed files with 135 additions and 82 deletions

View file

@ -4,6 +4,7 @@ import (
"html/template"
"github.com/mikestefanello/pagoda/pkg/controller"
"github.com/mikestefanello/pagoda/templates"
"github.com/labstack/echo/v4"
)
@ -27,8 +28,8 @@ type (
func (c *about) Get(ctx echo.Context) error {
page := controller.NewPage(ctx)
page.Layout = "main"
page.Name = "about"
page.Layout = templates.LayoutMain
page.Name = templates.PageAbout
page.Title = "About"
// This page will be cached!