hugo/docs/content/layout/templates.md
Noah Campbell 9500ec1b6b Refactor layout selection code
The render code path would use a fallback if there was an exception.
This change instead relies on explicit declaration of the layout to use
and includes a check to see if the layout indeed exists before
attempting to render it.
2013-10-08 18:44:15 +02:00

943 B

title date aliases
Templates 2013-07-01
/doc/templates/

Hugo uses the excellent golang html/template library for its template engine. 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 is a great place to start.

Template roles

There are 6 different kinds of templates that Hugo works with.

Homepage

The homepage of your site.

RSS

Used to render all rss documents.

Index

Page that list multiple pieces of content.

Content

Templates to render a single piece of content.

Views

Different ways of rendering each content type

Chrome

Simply the decoration of your site.