feat: add optional page description to search (#550)
Add optional page description to the search result list. The feature can be enabled by `geekdocSearchShowDescription=true` and is disabled by default. The max length of the description is set to `55` and will be truncated automatically if the limit is exceeded.
This commit is contained in:
parent
d82d05fffc
commit
fb905bd6c1
12 changed files with 87 additions and 91 deletions
|
@ -5,13 +5,12 @@
|
|||
type="text"
|
||||
id="gdoc-search-input"
|
||||
class="gdoc-search__input"
|
||||
placeholder="{{ i18n "form_placeholder_search" }}"
|
||||
placeholder="{{ i18n "form_placeholder_search" }}..."
|
||||
aria-label="{{ i18n "form_placeholder_search" }}"
|
||||
maxlength="64"
|
||||
data-site-base-url="{{ .Site.BaseURL }}"
|
||||
data-site-lang="{{ .Site.Language.Lang }}"
|
||||
/>
|
||||
<div class="gdoc-search__spinner spinner hidden"></div>
|
||||
<ul id="gdoc-search-results" class="gdoc-search__list"></ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue