Allow geekdocSearchShowParent

This commit is contained in:
Alvaro Torres Cogollo 2020-11-10 22:50:21 +01:00
parent 92254349c4
commit c2895e5c2a
3 changed files with 17 additions and 1 deletions

View file

@ -46,7 +46,12 @@
a = li.appendChild(document.createElement('a'));
a.href = page.href;
{{ if .Site.Params.GeekdocSearchShowParent }}
a.textContent = page.parent ? page.parent + ' / ' + page.title : page.title;
{{ else }}
a.textContent = page.title;
{{ end }}
results.appendChild(li);
results.classList.add("DUMMY");