@@ -763,79 +763,7 @@ are changing. For more information, see :ref:`Branching model`.
763763As you are making changes in this branch, you want to periodically generate the
764764documentation locally so that you can test your changes before you create a
765765GitHub pull request. For more information, see :ref: `Build documentation `.
766-
767- Use PyMeilisearch as a documentation search engine
768- --------------------------------------------------
769-
770- PyMeilisearch is a Python client library that lets you use MeiliSearch, an open
771- source search engine, to provide fast and relevant documentation search capabilities.
772-
773- To use PyMeilisearch as a search engine for multi-version documentation, perform
774- these steps.
775-
776- #. Ensure that you are using `Ansys Sphinx Theme <Ansys_Sphinx_theme_repo _>`_ version 0.8
777- or later for building your library's documentation.
778-
779- #. In the ``conf.py `` file in the ``doc/source `` directory, include these lines:
780-
781- .. code-block :: python
782-
783- import os
784-
785- from ansys_sphinx_theme import convert_version_to_pymeilisearch
786-
787-
788- cname = os.getenv(" DOCUMENTATION_CNAME" , " <DEFAULT_CNAME>" )
789- """ Canonical name (CNAME) of the webpage hosting the documentation."""
790-
791- html_theme_options = {
792- " use_meilisearch" : {
793- " api_key" : os.getenv(" MEILISEARCH_API_KEY" , " " ),
794- " index_uids" : {
795- f " <your-index-name> { convert_version_to_pymeilisearch(__version__ )} " : " index name to display" , # noqa: E501
796- },
797- },
798- ...
799- }
800-
801- #. In these lines, replace *<your-index-name> * with the name for your MeiliSearch index.
802-
803- The ``convert_version_to_pymeilisearch `` function converts your library's version into
804- a format suitable for MeiliSearch indexing.
805-
806- #. Enable documentation index deployment for development and stable versions using Ansys actions:
807-
808- .. code-block :: yaml
809-
810- jobs :
811- doc-deploy-index :
812- name : " Index the documentation and scrap using PyMeilisearch"
813- runs-on : ubuntu-latest
814- needs : doc-deploy
815- if : github.event_name == 'push'
816- steps :
817- - name : Scrape the stable documentation to PyMeilisearch
818- run : |
819- VERSION=$(python -c "from <your-package> import __version__; print('.'.join(__version__.split('.')[:2]))")
820- VERSION_MEILI=$(python -c "from <your-package> import __version__; print('-'.join(__version__.split('.')[:2]))")
821- echo "Calculated VERSION: $VERSION"
822- echo "Calculated VERSION_MEILI: $VERSION_MEILI"
823-
824- - name : " Deploy the latest documentation index"
825- uses : ansys/actions/doc-deploy-index@v4.1
826- with :
827- cname : " <library>.docs.pyansys.com/version/$VERSION"
828- index-name : " <index-name>v$VERSION_MEILI"
829- host-url : " <meilisearch-host-url>"
830- api-key : ${{ secrets.MEILISEARCH_API_KEY }}
831-
832- #. Replace *<your-package> *, *<your-index-name> *, and *<library> * with appropriate values
833- for your project.
834-
835- The version of your package is automatically calculated and used for indexing, ensuring that
836- your documentation remains up to date. For more information, see the `PyMeilisearch `_ and
837- `Ansys Sphinx Theme <ansys-sphinx-theme-doc _>`_ documentation.
838-
766+
839767.. _SEO :
840768
841769Optimize web searches
0 commit comments