2013-08-17 08:34:25 -04:00
|
|
|
---
|
2014-02-18 18:35:03 -05:00
|
|
|
title: "Hugo Templates"
|
2013-08-17 08:34:25 -04:00
|
|
|
date: "2013-07-01"
|
|
|
|
aliases: ["/doc/templates/"]
|
2013-10-26 02:18:14 -04:00
|
|
|
linktitle: "Overview"
|
|
|
|
groups: ["layout"]
|
|
|
|
groups_weight: 10
|
2013-08-17 08:34:25 -04:00
|
|
|
---
|
|
|
|
|
2014-03-24 07:19:25 -04:00
|
|
|
Hugo uses the excellent go html/template library for its template engine.
|
2013-08-17 08:34:25 -04:00
|
|
|
It is an extremely lightweight engine that provides a very small amount of
|
|
|
|
logic. In our experience that it is just the right amount of logic to be able
|
|
|
|
to create a good static website
|
|
|
|
|
|
|
|
If you are new to go's templates the [go template primer](/layout/go-templates)
|
|
|
|
is a great place to start.
|
|
|
|
|
|
|
|
## Template roles
|
|
|
|
|
|
|
|
There are 6 different kinds of templates that Hugo works with.
|
|
|
|
|
|
|
|
### [Homepage](/layout/homepage/)
|
2014-01-10 21:19:19 -05:00
|
|
|
The homepage of your site
|
2013-08-17 08:34:25 -04:00
|
|
|
|
|
|
|
### [RSS](/layout/rss/)
|
2014-01-10 21:19:19 -05:00
|
|
|
Used to render all rss documents
|
2013-08-17 08:34:25 -04:00
|
|
|
|
2013-10-07 00:57:45 -04:00
|
|
|
### [Index](/layout/indexes)
|
2014-01-10 21:19:19 -05:00
|
|
|
Page that list multiple pieces of content
|
2013-08-17 08:34:25 -04:00
|
|
|
|
|
|
|
### [Content](/layout/content)
|
2014-01-10 21:19:19 -05:00
|
|
|
Render a single piece of content
|
2013-08-17 08:34:25 -04:00
|
|
|
|
|
|
|
### [Views](/layout/views)
|
2014-01-10 21:19:19 -05:00
|
|
|
Different view of a single piece of content type
|
2013-08-17 08:34:25 -04:00
|
|
|
|
|
|
|
### [Chrome](/layout/chrome)
|
2014-01-10 21:19:19 -05:00
|
|
|
Support for the above templates
|