Open navClose nav

Templating

Hugo allows users to build layouts and themes using Golang’s Go Templates.

Go Templates

Go Templates expose Golang html/template as a template language for you to build your layouts and themes with.

An example of Go Templates:

<html>
<head>
    <title>{{ .Title }}</title>
</head>
<body>
<div id="content">
    <p>
         This is a long page content
         These lines are all part of the parent p
         <a href="/">Go To Main Page</a>
    </p>

See the Front Matter Template documentation for examples of how to use Forestry in your templates.

Further Reading


Last updated on July 24, 2017