aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/docs/title.html7
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 }}