Guides
Guides

Template Inheritance

Using Golf, you can easily apply template inheritance like this:

{{ extends "/layout.html" }}

{{ define "content" }}
  Some text.
{{ end }}
<!DOCTYPE html>
<html>
  <body>
    {{ template "content" }}
  </body>
</html>