From b91e9eaea764c478b9c4e188a2711525a242efb6 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 31 Mar 2020 23:29:21 +0200 Subject: #186, Make title generation cross-platform --- layouts/partials/docs/title.html | 3 +-- 1 file changed, 1 insertion(+), 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 }} -- cgit v1.2.3