aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-03-31 23:29:21 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-03-31 23:29:21 +0200
commitb91e9eaea764c478b9c4e188a2711525a242efb6 (patch)
tree8d6244ac66c23830dc08cdb978a60cb45077f7dd /layouts
parenta9867292af9c11138e2f4d145240dc890a5b8d66 (diff)
#186, Make title generation cross-platform
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/docs/title.html3
1 files changed, 1 insertions, 2 deletions
diff --git a/layouts/partials/docs/title.html b/layouts/partials/docs/title.html
index ffe858a..a37ac7a 100644
--- a/layouts/partials/docs/title.html
+++ b/layouts/partials/docs/title.html
@@ -7,8 +7,7 @@
{{ if .Title }}
{{ $title = .Title }}
{{ else if and .IsSection .File }}
- {{ $sections := split (trim .File.Dir "/") "/" }}
- {{ $title = index ($sections | last 1) 0 | humanize | title }}
+ {{ $title = path.Base .File.Dir | humanize | title }}
{{ else if and .IsPage .File }}
{{ $title = .File.BaseFileName | humanize | title }}
{{ end }}