Layouts are files that live in the layouts directory of your Thulite project. They are used to provide a reusable UI structure, such as a page template.

Examples

For example, the default Thulite base template looks like this:

<!doctype html>
<html lang="{{ .Site.LanguageCode | default "en" }}">
  {{ partial "head/head.html" . }}
  {{ partial "head/body-class.html" . }}
  <body class="{{ delimit (.Scratch.Get "class") " " }}">
    {{ block "main" . }}{{ end }}
    {{ if templates.Exists "partials/footer/script-footer.html" -}}
      {{ partial "footer/script-footer.html" . }}
    {{ else -}}
      {{ partial "footer/script-footer-core.html" . }}
    {{ end -}}
  </body>
</html>

Hugo documentation

Thulite leverages Hugo’s templates. Here are some relevant topics:

Hugo
Introduction to templating

Create templates to render your content, resources, and data.

Hugo
Template lookup order

Hugo uses a template for a given page, starting from the most specific.

Hugo
Base templates and blocks

Base and block constructs define the outer shell of your master templates.

Hugo
Single page templates

Single page templates are the primary view of content in Hugo.

Hugo
List page templates

List page templates render multiple pieces of content in a HTML page.

Hugo
Partial templates

Partials are context-aware components in your list and page templates.