hugo/docs/content/en/templates/single-page-templates.md
2024-06-21 09:41:24 +02:00

2.3 KiB

title description categories keywords menu weight toc aliases
Single page templates The primary view of content in Hugo is the single view. Hugo will render every Markdown file provided with a corresponding single template.
templates
page
templates
docs
parent weight
templates 50
50 true
/layout/content/

Single page template lookup order

See Template Lookup.

Example single page templates

{{< code file=layouts/posts/single.html >}} {{ define "main" }}

{{ .Title }}

{{ .Content }}
{{ end }} {{< /code >}}

To easily generate new instances of a content type (e.g., new .md files in a section like project/) with preconfigured front matter, use content archetypes.