Using Golang to statically generate your Web site

Gophers Meetup #18 (November 2016)

Kai Hendry

Why static HTML?

Golang HTML templates

How most 2016 production sites look like nowadays

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Web application</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<div id="app"></div>
<script src="/dist/FIVE-MEGABYTE-bundle.js"></script>

Lets throw in Golang to statify non-dynamic routes



Code demos

{{ template "header" . }}
{{ template "footer" }}

Thank you