diff --git a/doc/source/how-to/documenting.rst b/doc/source/how-to/documenting.rst index bdd8b0785..afe121e81 100644 --- a/doc/source/how-to/documenting.rst +++ b/doc/source/how-to/documenting.rst @@ -763,79 +763,7 @@ are changing. For more information, see :ref:`Branching model`. As you are making changes in this branch, you want to periodically generate the documentation locally so that you can test your changes before you create a GitHub pull request. For more information, see :ref:`Build documentation`. - -Use PyMeilisearch as a documentation search engine --------------------------------------------------- - -PyMeilisearch is a Python client library that lets you use MeiliSearch, an open -source search engine, to provide fast and relevant documentation search capabilities. - -To use PyMeilisearch as a search engine for multi-version documentation, perform -these steps. - -#. Ensure that you are using `Ansys Sphinx Theme `_ version 0.8 - or later for building your library's documentation. - -#. In the ``conf.py`` file in the ``doc/source`` directory, include these lines: - - .. code-block:: python - - import os - - from ansys_sphinx_theme import convert_version_to_pymeilisearch - - - cname = os.getenv("DOCUMENTATION_CNAME", "") - """Canonical name (CNAME) of the webpage hosting the documentation.""" - - html_theme_options = { - "use_meilisearch": { - "api_key": os.getenv("MEILISEARCH_API_KEY", ""), - "index_uids": { - f"{convert_version_to_pymeilisearch(__version__)}": "index name to display", # noqa: E501 - }, - }, - ... - } - -#. In these lines, replace ** with the name for your MeiliSearch index. - - The ``convert_version_to_pymeilisearch`` function converts your library's version into - a format suitable for MeiliSearch indexing. - -#. Enable documentation index deployment for development and stable versions using Ansys actions: - - .. code-block:: yaml - - jobs: - doc-deploy-index: - name: "Index the documentation and scrap using PyMeilisearch" - runs-on: ubuntu-latest - needs: doc-deploy - if: github.event_name == 'push' - steps: - - name: Scrape the stable documentation to PyMeilisearch - run: | - VERSION=$(python -c "from import __version__; print('.'.join(__version__.split('.')[:2]))") - VERSION_MEILI=$(python -c "from import __version__; print('-'.join(__version__.split('.')[:2]))") - echo "Calculated VERSION: $VERSION" - echo "Calculated VERSION_MEILI: $VERSION_MEILI" - - - name: "Deploy the latest documentation index" - uses: ansys/actions/doc-deploy-index@v4.1 - with: - cname: ".docs.pyansys.com/version/$VERSION" - index-name: "v$VERSION_MEILI" - host-url: "" - api-key: ${{ secrets.MEILISEARCH_API_KEY }} - -#. Replace **, **, and ** with appropriate values - for your project. - -The version of your package is automatically calculated and used for indexing, ensuring that -your documentation remains up to date. For more information, see the `PyMeilisearch`_ and -`Ansys Sphinx Theme `_ documentation. - + .. _SEO: Optimize web searches