Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions doc/source/user_guide/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ This dictionary should contain the following keys:
corresponding user-friendly name. Each key-value pair in the dictionary
represents an index, with the key being the index UID and the value
being the index name. The index UID points to an index on the server.
The list of all available indices can be found
at `Active Public Indices <https://stunning-adventure-k6g9rqj.pages.github.io/active_indices.html>`_ .


Here is an example configuration for using MeiliSearch in the ``conf.py`` file:

Expand All @@ -148,6 +147,23 @@ Here is an example configuration for using MeiliSearch in the ``conf.py`` file:
},
}

If your project features multiple documentation versions, it's crucial to adapt the ``index_uids``
mapping to accommodate different versions.
To ensure seamless search integration across versions,
use the following format to dynamically generate version-specific index ``UIDs``:

.. code-block:: python

from ansys_sphinx_theme import convert_version_to_pymeilisearch

use_meilisearch = {
"api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""),
"index_uids": {
f"ansys-sphinx-theme-v{convert_version_to_pymeilisearch(__version__)}": "ansys-sphinx-theme",
},
}


Here is the example configuration of using MeiliSearch in
``conf.py`` file of ``ansys-sphinx-theme``:

Expand Down