Skip to content

Layouts

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:

baseof.html
<!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: