mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-04-25 08:31:29 +00:00
Fix title partial, frontmatter title was ignored
This commit is contained in:
parent
625f202275
commit
c78c67ffed
@ -1,5 +1,8 @@
|
||||
{{ $title := .Title }}
|
||||
{{ if and .IsSection .File }}
|
||||
{{ $title := "" }}
|
||||
|
||||
{{ if .Title }}
|
||||
{{ $title = .Title }}
|
||||
{{ else if and .IsSection .File }}
|
||||
{{ $sections := split (trim .File.Dir "/") "/" }}
|
||||
{{ $title = index ($sections | last 1) 0 | humanize | title }}
|
||||
{{ else if and .IsPage .File }}
|
||||
|
Loading…
Reference in New Issue
Block a user