Bug 1730515 - FX doc: Use google search instead of sphinx search r=firefox-source-docs-reviewers,ahal DONTBUILD
sphinx search is pretty bad... Differential Revision: https://phabricator.services.mozilla.com/D128022
This commit is contained in:
16
docs/_templates/searchbox.html
vendored
Normal file
16
docs/_templates/searchbox.html
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<! -- This code is governed by the BSD license -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h3>{{ _('Quick search') }}</h3>
|
||||||
|
<script>
|
||||||
|
(function() {
|
||||||
|
var cx = 'dd12886298f75dbef';
|
||||||
|
var gcse = document.createElement('script');
|
||||||
|
gcse.async = true;
|
||||||
|
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||||
|
var s = document.getElementsByTagName('script')[0];
|
||||||
|
s.parentNode.insertBefore(gcse, s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<gcse:search></gcse:search>
|
||||||
|
</div>
|
||||||
@@ -71,6 +71,13 @@ templates_path = ["_templates"]
|
|||||||
source_suffix = [".rst", ".md"]
|
source_suffix = [".rst", ".md"]
|
||||||
master_doc = "index"
|
master_doc = "index"
|
||||||
project = "Firefox Source Docs"
|
project = "Firefox Source Docs"
|
||||||
|
# Override the search box to use Google instead of
|
||||||
|
# sphinx search
|
||||||
|
html_sidebars = {
|
||||||
|
"**": [
|
||||||
|
"searchbox.html",
|
||||||
|
]
|
||||||
|
}
|
||||||
html_logo = os.path.join(
|
html_logo = os.path.join(
|
||||||
topsrcdir, "browser/branding/nightly/content/firefox-wordmark.svg"
|
topsrcdir, "browser/branding/nightly/content/firefox-wordmark.svg"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user