Server-Rendered Views

Go's html/template gives you everything a templating engine needs: a base layout with overridable blocks, reusable partials, loops and conditionals, custom functions, and context-aware escaping that prevents XSS by default. Here we build a base layout, share header and footer partials across every page, and render typed view models — all without leaving the standard library.

← All posts