From d5aa1c6ccce68dd300f0063a1132ec6fb42ccbcc Mon Sep 17 00:00:00 2001 From: Timotheus Kampik Date: Sun, 24 Feb 2019 23:03:49 +0100 Subject: [PATCH] #36 add Google Search how-to to FAQ --- doc/faq.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/faq.rst b/doc/faq.rst index 4b608b780..4446463b8 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -119,6 +119,36 @@ Google Analytics {% endblock %} +Google Search + To replace Sphinx's built-in search function with Google Search, proceed as + follows: + + 1. Go to https://cse.google.com/cse/all to create the Google Search code + snippet. + + 2. Copy the code snippet and paste it into ``_templates/searchbox`` in your + Sphinx project: + + .. code-block:: html+django + +
+

{{ _('Quick search') }}

+ + +
+ + 3. Add ``searchbox.html`` to the :confval:`html_sidebars` configuration value. + .. _api role: https://git.savannah.gnu.org/cgit/kenozooid.git/tree/doc/extapi.py .. _xhtml to reST: http://docutils.sourceforge.net/sandbox/xhtml2rest/xhtml2rest.py