2019-07-16 16:36:40 +02:00
|
|
|
{{ $title := "" }}
|
|
|
|
|
|
|
|
{{ if .Title }}
|
|
|
|
{{ $title = .Title }}
|
|
|
|
{{ else if and .IsSection .File }}
|
2019-07-15 18:25:21 +02:00
|
|
|
{{ $sections := split (trim .File.Dir "/") "/" }}
|
|
|
|
{{ $title = index ($sections | last 1) 0 | humanize | title }}
|
|
|
|
{{ else if and .IsPage .File }}
|
|
|
|
{{ $title = .File.BaseFileName | humanize | title }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ return $title }}
|