Skip to content

Commit 4458b2c

Browse files
authored
Update documentation: run doc generation scripts (#1220)
1 parent 830b517 commit 4458b2c

30 files changed

+155
-91
lines changed

docs-v2/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 9aa03b764028cd3dfd551f9e15413a5f
3+
config: 1d3633658796d331deab1539e04016f8
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs-v2/assets/basic.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -757,6 +757,7 @@ span.pre {
757757
-ms-hyphens: none;
758758
-webkit-hyphens: none;
759759
hyphens: none;
760+
white-space: nowrap;
760761
}
761762

762763
div[class*="highlight-"] {

docs-v2/assets/classic.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- classic theme.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/

docs-v2/assets/doctools.js

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for all documentation.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -154,9 +154,7 @@ var Documentation = {
154154
this.fixFirefoxAnchorBug();
155155
this.highlightSearchWords();
156156
this.initIndexTable();
157-
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
158-
this.initOnKeyListeners();
159-
}
157+
this.initOnKeyListeners();
160158
},
161159

162160
/**
@@ -264,6 +262,16 @@ var Documentation = {
264262
hideSearchWords : function() {
265263
$('#searchbox .highlight-link').fadeOut(300);
266264
$('span.highlighted').removeClass('highlighted');
265+
var url = new URL(window.location);
266+
url.searchParams.delete('highlight');
267+
window.history.replaceState({}, '', url);
268+
},
269+
270+
/**
271+
* helper function to focus on search bar
272+
*/
273+
focusSearchBar : function() {
274+
$('input[name=q]').first().focus();
267275
},
268276

269277
/**
@@ -288,27 +296,54 @@ var Documentation = {
288296
},
289297

290298
initOnKeyListeners: function() {
299+
// only install a listener if it is really needed
300+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
301+
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
302+
return;
303+
291304
$(document).keydown(function(event) {
292305
var activeElementType = document.activeElement.tagName;
293306
// don't navigate when in search box, textarea, dropdown or button
294307
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
295-
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
296-
&& !event.shiftKey) {
297-
switch (event.keyCode) {
298-
case 37: // left
299-
var prevHref = $('link[rel="prev"]').prop('href');
300-
if (prevHref) {
301-
window.location.href = prevHref;
302-
return false;
303-
}
304-
break;
305-
case 39: // right
306-
var nextHref = $('link[rel="next"]').prop('href');
307-
if (nextHref) {
308-
window.location.href = nextHref;
309-
return false;
310-
}
311-
break;
308+
&& activeElementType !== 'BUTTON') {
309+
if (event.altKey || event.ctrlKey || event.metaKey)
310+
return;
311+
312+
if (!event.shiftKey) {
313+
switch (event.key) {
314+
case 'ArrowLeft':
315+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
316+
break;
317+
var prevHref = $('link[rel="prev"]').prop('href');
318+
if (prevHref) {
319+
window.location.href = prevHref;
320+
return false;
321+
}
322+
break;
323+
case 'ArrowRight':
324+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
325+
break;
326+
var nextHref = $('link[rel="next"]').prop('href');
327+
if (nextHref) {
328+
window.location.href = nextHref;
329+
return false;
330+
}
331+
break;
332+
case 'Escape':
333+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
334+
break;
335+
Documentation.hideSearchWords();
336+
return false;
337+
}
338+
}
339+
340+
// some keyboard layouts may need Shift to get /
341+
switch (event.key) {
342+
case '/':
343+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
344+
break;
345+
Documentation.focusSearchBar();
346+
return false;
312347
}
313348
}
314349
});

docs-v2/assets/documentation_options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ var DOCUMENTATION_OPTIONS = {
88
LINK_SUFFIX: '.html',
99
HAS_SOURCE: true,
1010
SOURCELINK_SUFFIX: '.txt',
11-
NAVIGATION_WITH_KEYS: false
11+
NAVIGATION_WITH_KEYS: false,
12+
SHOW_SEARCH_SUMMARY: true,
13+
ENABLE_SEARCH_SHORTCUTS: true,
1214
};

docs-v2/assets/language_data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This script contains the language-specific data used by searchtools.js,
66
* namely the list of stopwords, stemmer, scorer and splitter.
77
*
8-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
8+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
99
* :license: BSD, see LICENSE for details.
1010
*
1111
*/

docs-v2/assets/searchtools.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for the full-text search.
66
*
7-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -172,10 +172,6 @@ var Search = {
172172
}
173173
// stem the word
174174
var word = stemmer.stemWord(tmp[i].toLowerCase());
175-
// prevent stemmer from cutting word smaller than two chars
176-
if(word.length < 3 && tmp[i].length >= 3) {
177-
word = tmp[i];
178-
}
179175
var toAppend;
180176
// select the correct list
181177
if (word[0] == '-') {
@@ -276,7 +272,7 @@ var Search = {
276272
setTimeout(function() {
277273
displayNextItem();
278274
}, 5);
279-
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
275+
} else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
280276
$.ajax({url: requestUrl,
281277
dataType: "text",
282278
complete: function(jqxhr, textstatus) {
@@ -293,7 +289,7 @@ var Search = {
293289
}, 5);
294290
}});
295291
} else {
296-
// no source available, just display title
292+
// just display title
297293
Search.output.append(listItem);
298294
setTimeout(function() {
299295
displayNextItem();

docs-v2/assets/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Once the browser is closed the cookie is deleted and the position
1717
* reset to the default (expanded).
1818
*
19-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
19+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
2020
* :license: BSD, see LICENSE for details.
2121
*
2222
*/

docs-v2/real_time_messaging.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ <h2>rtm.start vs rtm.connect<a class="headerlink" href="#rtm-start-vs-rtm-connec
320320
</section>
321321
<section id="rtm-events">
322322
<h2>RTM Events<a class="headerlink" href="#rtm-events" title="Permalink to this headline"></a></h2>
323-
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
324-
<span class="s1">&#39;type&#39;</span><span class="o">:</span> <span class="s1">&#39;message&#39;</span><span class="p">,</span>
325-
<span class="s1">&#39;ts&#39;</span><span class="o">:</span> <span class="s1">&#39;1358878749.000002&#39;</span><span class="p">,</span>
326-
<span class="s1">&#39;user&#39;</span><span class="o">:</span> <span class="s1">&#39;U023BECGF&#39;</span><span class="p">,</span>
327-
<span class="s1">&#39;text&#39;</span><span class="o">:</span> <span class="s1">&#39;Hello&#39;</span>
328-
<span class="p">}</span>
323+
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
324+
<span class="w"> </span><span class="s1">&#39;type&#39;</span><span class="o">:</span><span class="w"> </span><span class="s1">&#39;message&#39;</span><span class="p">,</span><span class="w"></span>
325+
<span class="w"> </span><span class="s1">&#39;ts&#39;</span><span class="o">:</span><span class="w"> </span><span class="s1">&#39;1358878749.000002&#39;</span><span class="p">,</span><span class="w"></span>
326+
<span class="w"> </span><span class="s1">&#39;user&#39;</span><span class="o">:</span><span class="w"> </span><span class="s1">&#39;U023BECGF&#39;</span><span class="p">,</span><span class="w"></span>
327+
<span class="w"> </span><span class="s1">&#39;text&#39;</span><span class="o">:</span><span class="w"> </span><span class="s1">&#39;Hello&#39;</span><span class="w"></span>
328+
<span class="p">}</span><span class="w"></span>
329329
</pre></div>
330330
</div>
331331
<p>See <a class="reference external" href="https://api.slack.com/rtm#events">RTM Events</a> for a complete list of events.</p>

docs-v2/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)