This guide provides an overview of the templates available in the Hugo templates
directory. Templates are essential for customizing the appearance of your Hugo site.
Getting Started
To use a template, you need to create a new file in the layouts
directory of your Hugo project. The file name should match the template you want to use.
Available Templates
default.html
: The default layout for pages.single.html
: The layout for single posts.index.html
: The layout for index pages.page.html
: The layout for pages.list.html
: The layout for list pages.
Language Styles
If you access this guide through a language-specific path (e.g., /en/xxx
), you will receive content in English. Otherwise, you will receive content in Chinese.
Example Usage
Here's an example of how to include a template in your layout:
{{ template "default.html" . }}
This will render the default.html
template with the context data provided by the current page.
Further Reading
For more information on templates, please refer to the Hugo Templates documentation.