Add Public Page Skill
Use this skill for public pages that do not need a new data model: content pages, dashboards, marketing pages, or route/template additions.
Workflow
- Read Creating Static Pages.
- Inspect the existing page patterns in
app/pages/pages.handler.go,app/pages/pages.route.go, andapp/views/templates/base.html. - Create top-level public templates in
app/views/templates/unless the page belongs to a feature package. - Add a
PageHandlermethod that renders the template through the public renderer. - Register the route in
PageRoutes. - Use
middleware.RequireAuth(sm, client)for private pages. - Add navigation in
base.htmlonly when the page should be globally discoverable. - Run
go test ./....
Template Conventions
- Full pages define both
titleandcontent. - Pass dynamic values through
TemplateData.Data. - Use
.Userfor renderer-injected current-user data when available. - Keep public pages separate from admin templates and admin renderers.