|
@@ -1,12 +1,14 @@
|
1
|
1
|
{{/*These templates contains some more complex logic and shared between partials*/}}
|
2
|
2
|
{{- define "title" -}}
|
3
|
|
- {{- if .Pages -}}
|
4
|
|
- {{ $sections := split (trim .Dir "/") "/" }}
|
5
|
|
- {{ $title := index ($sections | last 1) 0 | humanize | title }}
|
6
|
|
- {{- default $title .Title -}}
|
7
|
|
- {{- else -}}
|
8
|
|
- {{ $title := .File | humanize | title }}
|
9
|
|
- {{- default $title .Title -}}
|
|
3
|
+ {{- if .File -}}
|
|
4
|
+ {{- if .Pages -}}
|
|
5
|
+ {{ $sections := split (trim .File.Dir "/") "/" }}
|
|
6
|
+ {{ $title := index ($sections | last 1) 0 | humanize | title }}
|
|
7
|
+ {{- default $title .Title -}}
|
|
8
|
+ {{- else -}}
|
|
9
|
+ {{ $title := .File.BaseFileName | humanize | title }}
|
|
10
|
+ {{- default $title .Title -}}
|
|
11
|
+ {{- end -}}
|
10
|
12
|
{{- end -}}
|
11
|
13
|
{{- end -}}
|
12
|
14
|
|
|
@@ -23,4 +25,4 @@
|
23
|
25
|
color: {{ default "#004ed0" .Site.Params.BookMenuBundleActiveLinkColor }};
|
24
|
26
|
}
|
25
|
27
|
</style>
|
26
|
|
-{{- end -}}
|
|
28
|
+{{- end -}}
|