Skip to main content
The web template provides a complete full-stack structure for server-rendered websites. “Full-stack” means it includes everything: server code (Go), templates (HTML), styles (CSS), and client-side code (JavaScript). This page explains how all the pieces fit together.

Directory Layout

Core Files

app/web/app.go

app/web/routes.go

Handler Files

handler/home.go

View Files

views/layouts/main.html

views/pages/home.html

views/partials/nav.html

Asset Files

assets/embed.go

This embeds CSS and JS files into the binary.

assets/css/style.css

Adding a New Page

  1. Create handler: handler/contact.go
  2. Create view: views/pages/contact.html
  3. Add route: app/web/routes.go

Next Steps

Tutorial

Build a complete website

View Engine

Learn more about templates