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.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/docs/shared.html b/layouts/partials/docs/shared.html
index ec303f5..3fbf628 100644
--- a/layouts/partials/docs/shared.html
+++ b/layouts/partials/docs/shared.html
@@ -1,10 +1,10 @@
{{/*These templates contains some more complex logic and shared between partials*/}}
{{- define "title" -}}
- {{- if .Pages -}}
- {{ $sections := split (trim .Dir "/") "/" }}
+ {{- if and .File .Pages -}}
+ {{ $sections := split (trim .File.Dir "/") "/" }}
{{ $title := index ($sections | last 1) 0 | humanize | title }}
{{- default $title .Title -}}
- {{- else -}}
+ {{- else if .File -}}
{{ $title := .File | humanize | title }}
{{- default $title .Title -}}
{{- end -}}