--- title: Single templates description: Create a single template to render a single page. categories: [] keywords: [] weight: 60 aliases: [/layout/content/,/templates/single-page-templates/] --- The single template below inherits the site's shell from the [base template]. [base template]: /templates/types/ ```go-html-template {file="layouts/_default/single.html"} {{ define "main" }}

{{ .Title }}

{{ .Content }} {{ end }} ``` Review the [template lookup order] to select a template path that provides the desired level of specificity. [template lookup order]: /templates/lookup-order/#single-templates The single template below inherits the site's shell from the base template, and renders the page title, creation date, content, and a list of associated terms in the "tags" taxonomy. ```go-html-template {file="layouts/_default/single.html"} {{ define "main" }}

{{ .Title }}

{{ with .Date }} {{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateHuman := . | time.Format ":date_long" }} {{ end }}
{{ .Content }}
{{ end }} ```