diff options
| author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-03-31 23:29:21 +0200 |
|---|---|---|
| committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-03-31 23:29:21 +0200 |
| commit | b91e9eaea764c478b9c4e188a2711525a242efb6 (patch) | |
| tree | 8d6244ac66c23830dc08cdb978a60cb45077f7dd | |
| parent | a9867292af9c11138e2f4d145240dc890a5b8d66 (diff) | |
#186, Make title generation cross-platform
| -rw-r--r-- | layouts/partials/docs/title.html | 3 |
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 }} |
