Fix title partial, frontmatter title was ignored

This commit is contained in:
Alex Shpak 2019-07-16 16:36:40 +02:00
parent 625f202275
commit c78c67ffed

View file

@ -1,5 +1,8 @@
{{ $title := .Title }} {{ $title := "" }}
{{ if and .IsSection .File }}
{{ if .Title }}
{{ $title = .Title }}
{{ else if and .IsSection .File }}
{{ $sections := split (trim .File.Dir "/") "/" }} {{ $sections := split (trim .File.Dir "/") "/" }}
{{ $title = index ($sections | last 1) 0 | humanize | title }} {{ $title = index ($sections | last 1) 0 | humanize | title }}
{{ else if and .IsPage .File }} {{ else if and .IsPage .File }}