diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-02-14 03:02:31 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-02-14 03:02:31 +0900 |
| commit | d7c6fa853ce433640331deab837b3a0c0edb3c9d (patch) | |
| tree | 0fd7b0723308dd933671301fedb285411484289b /sphinx/themes/basic | |
| parent | a10f7338117212b7f3601288b762cb8ba5b67e24 (diff) | |
| parent | 2be06309518d9401a42880bb5b4321dfdd1e5e90 (diff) | |
| download | sphinx-git-d7c6fa853ce433640331deab837b3a0c0edb3c9d.tar.gz | |
Merge commit '2be06309518d9401a42880bb5b4321dfdd1e5e90'
Diffstat (limited to 'sphinx/themes/basic')
| -rw-r--r-- | sphinx/themes/basic/static/documentation_options.js_t | 3 | ||||
| -rw-r--r-- | sphinx/themes/basic/static/searchtools.js | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/themes/basic/static/documentation_options.js_t b/sphinx/themes/basic/static/documentation_options.js_t index 8afaac2f8..5f4cca454 100644 --- a/sphinx/themes/basic/static/documentation_options.js_t +++ b/sphinx/themes/basic/static/documentation_options.js_t @@ -8,5 +8,6 @@ var DOCUMENTATION_OPTIONS = { LINK_SUFFIX: '{{ link_suffix }}', HAS_SOURCE: {{ has_source|lower }}, SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}', - NAVIGATION_WITH_KEYS: {{ 'true' if theme_navigation_with_keys|tobool else 'false'}} + NAVIGATION_WITH_KEYS: {{ 'true' if theme_navigation_with_keys|tobool else 'false'}}, + SHOW_SEARCH_SUMMARY: {{ 'true' if show_search_summary else 'false' }} }; diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js index 943507508..cba0817ce 100644 --- a/sphinx/themes/basic/static/searchtools.js +++ b/sphinx/themes/basic/static/searchtools.js @@ -62,7 +62,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => { const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; - const docHasSource = DOCUMENTATION_OPTIONS.HAS_SOURCE; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; const [docName, title, anchor, descr] = item; @@ -90,7 +90,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => { if (descr) listItem.appendChild(document.createElement("span")).innerText = " (" + descr + ")"; - else if (docHasSource) + else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) .then((data) => { |
