Skip to content

Commit 807b335

Browse files
Docs: Add examples and link for meilisearch. (#207)
* Docs: Add examples and link for meilisearch * Docs: Fix the typo * Apply suggestions from code review Co-authored-by: Roberto Pastor Muela <[email protected]> --------- Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent 7396f15 commit 807b335

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

doc/source/user_guide/options.rst

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,23 @@ dictionary in the ``conf.py`` file.
115115

116116
This dictionary should contain the following keys:
117117

118-
#. ``host``: The host name of your MeiliSearch instance.
118+
#. ``host``: The host name of your MeiliSearch instance. It is hosted at
119+
https://search.pyansys.com on port 443 (default).
119120
You can set this to an environment variable using
120121
``os.getenv()`` for added security.
121122

122123
#. ``api_key``: The API key for your MeiliSearch instance.
123124
You can also set this to an environment variable using ``os.getenv()``.
124125

125-
#. ``index_uids``: A dictionary that maps index UID to user-friendly index names.
126-
Each key-value pair represents an index, with the key
127-
being the index UID and the value being the index name.
126+
#. ``index_uids``: A dictionary that provides a mapping between the unique
127+
identifier (UID) of an index and its
128+
corresponding user-friendly name. Each key-value pair in the dictionary
129+
represents an index, with the key being the index UID and the value
130+
being the index name. The index UID points to an index on the server.
131+
The list of all available indices can be found
132+
at `Active Public Indices <https://stunning-adventure-k6g9rqj.pages.github.io/active_indices.html>`.
128133

129-
Here is an example configuration for using MeiliSearch in ``conf.py`` file:
134+
Here is an example configuration for using MeiliSearch in the ``conf.py`` file:
130135

131136
.. code-block:: python
132137
@@ -141,6 +146,24 @@ Here is an example configuration for using MeiliSearch in ``conf.py`` file:
141146
}
142147
}
143148
149+
Here is the example configuration of using MeiliSearch in
150+
``conf.py`` file of ``ansys-sphinx-theme``:
151+
152+
.. code-block:: python
153+
154+
import os
155+
156+
html_theme_options = {
157+
"use_meilisearch": {
158+
"host": os.getenv("MEILISEARCH_HOST_NAME", ""),
159+
"api_key": os.getenv("MEILISEARCH_API_KEY", ""),
160+
"index_uids": {
161+
"ansys-ansys-sphinx-theme-sphinx-docs": "ansys-sphinx-theme",
162+
"pyansys-docs-all-public": "PyAnsys",
163+
},
164+
},
165+
}
166+
144167
With these options set, your Sphinx project can use MeiliSearch
145168
to provide search functionality for your documentation.
146169

@@ -149,4 +172,3 @@ to provide search functionality for your documentation.
149172
If you do not set the "use_meilisearch" option,
150173
``ansys-sphinx-theme`` uses the default search functionality
151174
inherited from the PyData Sphinx Theme.
152-

0 commit comments

Comments
 (0)