diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-07-16 16:36:40 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-08-06 11:33:42 +0200 |
commit | c78c67ffeda5948d701566fb21fffbd8cccdbfb2 (patch) | |
tree | f3fa989cbc1caf13312a7f17491e0f43f6bee9fc | |
parent | 625f202275d7a835d0449b838a8971de45656596 (diff) |
Fix title partial, frontmatter title was ignored
-rw-r--r-- | layouts/partials/docs/title.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/layouts/partials/docs/title.html b/layouts/partials/docs/title.html index 91d5f81..f32e8da 100644 --- a/layouts/partials/docs/title.html +++ b/layouts/partials/docs/title.html @@ -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 }} |