aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/shared.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs/shared.html')
-rw-r--r--layouts/partials/docs/shared.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/layouts/partials/docs/shared.html b/layouts/partials/docs/shared.html
index 2678840..a5075c8 100644
--- a/layouts/partials/docs/shared.html
+++ b/layouts/partials/docs/shared.html
@@ -1,12 +1,14 @@
{{/*These templates contains some more complex logic and shared between partials*/}}
{{ define "title" }}
- {{ if and .File .Pages }}
+ {{ if and .IsSection .File }}
{{ $sections := split (trim .File.Dir "/") "/" }}
{{ $title := index ($sections | last 1) 0 | humanize | title }}
{{ default $title .Title }}
- {{ else if .File }}
- {{ $title := .File.BaseFileName | humanize | title }}
+ {{ else if and .IsPage .File }}
+ {{ $title := .File.BaseFileName | humanize | title }}
{{ default $title .Title }}
+ {{ else }}
+ {{ .Title }}
{{ end }}
{{ end }}