Improve side menu rendering

This commit is contained in:
Alex Shpak
2018-09-18 01:35:54 +02:00
parent 561659ed53
commit 8678e82154
6 changed files with 41 additions and 36 deletions
+2 -2
View File
@@ -3,9 +3,9 @@
{{- if .Pages -}}
{{ $sections := split (trim .Dir "/") "/" }}
{{ $title := index ($sections | last 1) 0 | humanize | title }}
{{- default .Title $title -}}
{{- default $title .Title -}}
{{- else -}}
{{ $title := .File | humanize | title }}
{{- default .Title $title -}}
{{- default $title .Title -}}
{{- end -}}
{{ end }}