Skip to main content

A Sphinx extension for replacing the built-in search with Algolia DocSearch

Project description

Algolia DocSearch for Sphinx

This extension for the Sphinx documentation generator replaces Sphinx's built-in search with Algolia DocSearch.

Before you begin

Apply for DocSearch. You'll get an email with your Algolia credentials.

This extension supports Python versions 3.8 and later and Sphinx versions 5 and later.

For a list of supported themes, see HTML theme support

Install

Install the sphinx-docsearch package:

pip install sphinx-docsearch

Configure

  1. Add sphinx-docsearch to your Sphinx configuration:

    # conf.py
    extensions += ["sphinx_docsearch"]
    
  2. Add your Algolia credentials to your Sphinx configuration:

    # conf.py
    docsearch_app_id = "<DOCSEARCH_APP_ID>"
    docsearch_api_key = "<DOCSEARCH_SEARCH_API_KEY>"
    docsearch_index_name = "<DOCSEARCH_INDEX_NAME>"
    

    See also:

Customize

To change what the crawler should extract from your pages, see Record Extractor.

If you're using a Sphinx theme that's not supported, you can add custom templates to add the DocSearch UI. You can further customize the look of the DocSearch UI by adding custom CSS. For more information, see Customize.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_docsearch-0.1.0.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

sphinx_docsearch-0.1.0-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_docsearch-0.1.0.tar.gz.

File metadata

  • Download URL: sphinx_docsearch-0.1.0.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.8.0-1014-azure

File hashes

Hashes for sphinx_docsearch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76fd0695e115b76ebb9633acffc263bfd894caad7aa29e3c40bfe3171da41535
MD5 d23a9c0cd6472c253a5dcb027bdac488
BLAKE2b-256 7c3c52eb72d3e837f269aed90b0ef1b4f7dd437d26cc6812209f839c91053d8f

See more details on using hashes here.

File details

Details for the file sphinx_docsearch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sphinx_docsearch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.8.0-1014-azure

File hashes

Hashes for sphinx_docsearch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 799221b0b962e3d86d0e0f084d4998c3d9227ef0eb2883d70e41d6bd08b616dd
MD5 1e7ac07c05f30ca746f06aac33311aa7
BLAKE2b-256 2b444e59ba1820e8190d1cb3bceb491d875da5f79fb3f61f5c2fe82037c3546e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page