2020-07-06 18:55:32 +00:00
|
|
|
{{ $title := "" }}
|
|
|
|
|
|
|
|
{{ if .Title }}
|
2021-12-30 14:55:55 +00:00
|
|
|
{{ $title = .Title }}
|
2020-07-06 18:55:32 +00:00
|
|
|
{{ else if and .IsSection .File }}
|
2021-12-30 14:55:55 +00:00
|
|
|
{{ $title = path.Base .File.Dir | humanize | title }}
|
2020-07-06 18:55:32 +00:00
|
|
|
{{ else if and .IsPage .File }}
|
2021-12-30 14:55:55 +00:00
|
|
|
{{ $title = .File.BaseFileName | humanize | title }}
|
2020-07-22 08:51:13 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if eq .Kind "term" }}
|
2021-12-30 14:55:55 +00:00
|
|
|
{{ $title = $title | humanize | title }}
|
2020-07-06 18:55:32 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ return $title }}
|