File tree 5 files changed +37
-6
lines changed
5 files changed +37
-6
lines changed Original file line number Diff line number Diff line change
1
+ .wy-nav-side { overflow : visible; }
2
+ .wy-side-scroll { overflow : inherit; }
3
+
4
+ .algolia-autocomplete {
5
+ display : block !important ;
6
+ }
Original file line number Diff line number Diff line change
1
+
2
+ ( function ( ) {
3
+
4
+ var doc_version = document . querySelector ( 'meta[name="doc_version"]' ) . getAttribute ( 'content' ) ;
5
+
6
+ // Initialize the Algolia search widget
7
+ docsearch ( {
8
+ apiKey : 'c39cb614363a2a156811478bc2d0573b' ,
9
+ indexName : 'godotengine' ,
10
+ inputSelector : '#rtd-search-form input[type=text]' ,
11
+ algoliaOptions : {
12
+ facetFilters : [ "version:" + ( doc_version || 'stable' ) ]
13
+ } ,
14
+ } ) ;
15
+
16
+ window . addEventListener ( 'keydown' , function ( event ) {
17
+ if ( event . key === '/' ) {
18
+ document . querySelector ( '#rtd-search-form input[type=text]' ) . focus ( ) ;
19
+ event . preventDefault ( ) ;
20
+ }
21
+ } )
22
+ } ) ( ) ;
Original file line number Diff line number Diff line change 1
1
{% extends "!layout.html" -%}
2
+
3
+ {% block extrahead -%}
4
+ < meta name ="doc_version " content ="{{ version }} ">
5
+ {% endblock -%}
6
+
2
7
{% block linktags -%}
3
8
< meta name ="theme-color " content ="#3d8fcc ">
4
9
{% if godot_inject_language_links -%}
Original file line number Diff line number Diff line change 61
61
if not os .getenv ("SPHINX_NO_GDSCRIPT" ):
62
62
extensions .append ("gdscript" )
63
63
64
- if not os .getenv ("SPHINX_NO_SEARCH" ):
65
- extensions .append ("sphinx_search.extension" )
66
-
67
64
if not os .getenv ("SPHINX_NO_DESCRIPTIONS" ):
68
65
extensions .append ("godot_descriptions" )
69
66
189
186
# These paths are either relative to html_static_path
190
187
# or fully qualified paths (e.g. https://...)
191
188
html_css_files = [
189
+ 'css/algolia.css' ,
190
+ 'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css' ,
192
191
"css/custom.css" ,
193
192
]
194
193
195
194
html_js_files = [
196
195
"js/custom.js" ,
196
+ ('https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js' , {'defer' : 'defer' }),
197
+ ('js/algolia.js' , {'defer' : 'defer' })
197
198
]
198
199
199
200
# Output file base name for HTML help builder
Original file line number Diff line number Diff line change @@ -15,6 +15,3 @@ sphinx-notfound-page==0.7.1
15
15
16
16
# Adds Open Graph tags in the HTML `<head>` tag
17
17
sphinxext-opengraph == 0.4.2
18
-
19
- # Full-page search UI for RTD: https://readthedocs-sphinx-search.readthedocs.io
20
- readthedocs-sphinx-search == 0.1.0
You can’t perform that action at this time.
0 commit comments