2018-09-17 18:29:36 +02:00
|
|
|
<!-- 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 }}
|
2018-09-18 01:35:54 +02:00
|
|
|
{{- default $title .Title -}}
|
2018-09-17 18:29:36 +02:00
|
|
|
{{- else -}}
|
|
|
|
{{ $title := .File | humanize | title }}
|
2018-09-18 01:35:54 +02:00
|
|
|
{{- default $title .Title -}}
|
2018-09-17 18:29:36 +02:00
|
|
|
{{- end -}}
|
|
|
|
{{ end }}
|