From dda0a0eab19457598b71f2b2b2f978b09d3f95c7 Mon Sep 17 00:00:00 2001
From: Alex Shpak <alex-shpak@users.noreply.github.com>
Date: Mon, 15 Jul 2019 18:25:21 +0200
Subject: Start work on search feature with lunr

---
 layouts/partials/docs/title.html | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 layouts/partials/docs/title.html

(limited to 'layouts/partials/docs/title.html')

diff --git a/layouts/partials/docs/title.html b/layouts/partials/docs/title.html
new file mode 100644
index 0000000..91d5f81
--- /dev/null
+++ b/layouts/partials/docs/title.html
@@ -0,0 +1,9 @@
+{{ $title := .Title }}
+{{ if and .IsSection .File }}
+  {{ $sections := split (trim .File.Dir "/") "/" }}
+  {{ $title = index ($sections | last 1) 0 | humanize | title }}
+{{ else if and .IsPage .File }}
+  {{ $title = .File.BaseFileName | humanize | title }}
+{{ end }}
+
+{{ return $title }}
-- 
cgit v1.2.3