blob: 91c71b63f185f3702227a78db9cbbc5a71455f9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
<!-- These templates contains some more complex logic and shared between partials-->
{{ define "title" }}
{{- if .Pages -}}
{{ $sections := split (trim .Dir "/") "/" }}
{{ $title := index ($sections | last 1) 0 | humanize | title }}
{{- default $title .Title -}}
{{- else -}}
{{ $title := .File | humanize | title }}
{{- default $title .Title -}}
{{- end -}}
{{ end }}
|