#186, Make title generation cross-platform
This commit is contained in:
parent
a9867292af
commit
b91e9eaea7
1 changed files with 1 additions and 2 deletions
|
@ -7,8 +7,7 @@
|
||||||
{{ if .Title }}
|
{{ if .Title }}
|
||||||
{{ $title = .Title }}
|
{{ $title = .Title }}
|
||||||
{{ else if and .IsSection .File }}
|
{{ else if and .IsSection .File }}
|
||||||
{{ $sections := split (trim .File.Dir "/") "/" }}
|
{{ $title = path.Base .File.Dir | humanize | title }}
|
||||||
{{ $title = index ($sections | last 1) 0 | humanize | title }}
|
|
||||||
{{ else if and .IsPage .File }}
|
{{ else if and .IsPage .File }}
|
||||||
{{ $title = .File.BaseFileName | humanize | title }}
|
{{ $title = .File.BaseFileName | humanize | title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue