@@ -115,18 +115,23 @@ dictionary in the ``conf.py`` file.
115
115
116
116
This dictionary should contain the following keys:
117
117
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).
119
120
You can set this to an environment variable using
120
121
``os.getenv() `` for added security.
121
122
122
123
#. ``api_key ``: The API key for your MeiliSearch instance.
123
124
You can also set this to an environment variable using ``os.getenv() ``.
124
125
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> `.
128
133
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:
130
135
131
136
.. code-block :: python
132
137
@@ -141,6 +146,24 @@ Here is an example configuration for using MeiliSearch in ``conf.py`` file:
141
146
}
142
147
}
143
148
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
+
144
167
With these options set, your Sphinx project can use MeiliSearch
145
168
to provide search functionality for your documentation.
146
169
@@ -149,4 +172,3 @@ to provide search functionality for your documentation.
149
172
If you do not set the "use_meilisearch" option,
150
173
``ansys-sphinx-theme `` uses the default search functionality
151
174
inherited from the PyData Sphinx Theme.
152
-
0 commit comments